CN-115203543-B - Content recommendation method, training method and device of content recommendation model
Abstract
The method comprises the steps of obtaining a historical interaction content sequence and candidate content of an object to be recommended under a target scene, extracting the characteristics of the historical interaction content sequence and the candidate content through the content recommendation model to obtain scene characteristics and global characteristics of the historical interaction content and the candidate content, encoding the scene characteristics and the global characteristics of the historical interaction content to obtain scene sequence characteristics and global sequence characteristics of the historical interaction content sequence, extracting the scene sequence characteristics of the historical interaction content sequence to obtain group characteristics of the object to be recommended, obtaining recommendation index information according to the group characteristics, the scene sequence characteristics, the global sequence characteristics and the scene characteristics and the global characteristics of the candidate content, and determining the target recommendation content of the object to be recommended from the candidate content based on the recommendation index information. The method can improve the quality of the recommended content across scenes.
Inventors
- LI YONG
- SONG YANG
- LIN GUANYU
- GAO CHEN
- ZHENG YU
- CHANG JIANXIN
- NIU YANAN
- JIN DEPENG
- LI ZHIHENG
Assignees
- 清华大学
- 北京达佳互联信息技术有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20220629
Claims (13)
- 1. A content recommendation method, the method comprising: The method comprises the steps of obtaining a historical interaction content sequence and candidate content of an object to be recommended under a target scene, wherein the target scene is any one of a plurality of recommended scenes, and the plurality of recommended scenes are obtained by dividing based on association attribute information of the recommended content; The method comprises the steps of respectively extracting features of a historical interaction content sequence and candidate content through a global feature layer and a scene feature layer in a content recommendation model to obtain scene features and global features of the historical interaction content and the candidate content, wherein the scene features represent features which influence interaction between the object to be recommended and the candidate content in the target scene, and the global features represent features which influence interaction between the object to be recommended and the candidate content in the multiple scenes; Respectively encoding the scene characteristics and the global characteristics of the historical interaction content by a global sequence encoder and a scene sequence encoder in the content recommendation model to obtain scene sequence characteristics and global sequence characteristics of the historical interaction content sequence; the scene sequence features characterize transfer features among the specific contents in the target scene, and the global sequence features characterize transfer features among the contents in the plurality of recommended scenes; Comparing the scene sequence features with prototype features of a plurality of preset group prototypes through a group prototype attention layer in the content recommendation model to obtain group similarity between the scene sequence features and the prototype features of each group prototype, and carrying out weighted average on the prototype features of each group prototype through the group similarity to obtain group features of the object to be recommended; processing the group characteristics, the scene sequence characteristics, the global sequence characteristics, the scene characteristics and the global characteristics of the candidate content by an information determining unit in the content recommendation model to obtain recommendation index information of the candidate content in the target scene; and determining target recommended content aiming at the object to be recommended from the candidate content based on the recommended index information.
- 2. The method of claim 1, wherein the information determining unit includes a first information determining unit and a second information determining unit, and wherein the processing the group feature, the scene sequence feature, the global sequence feature, and the scene feature and the global feature of the candidate content to obtain recommendation index information of the candidate content in the target scene includes: Processing the group characteristics, the scene sequence characteristics and the scene characteristics of the candidate content by the first information determining unit to obtain scene recommendation index information of the candidate content; Processing the global sequence feature and the global feature of the candidate content by the second information determining unit to obtain global recommendation index information of the candidate content; and obtaining the recommendation index information of the candidate content in the target scene according to the scene recommendation index information and the global recommendation index information.
- 3. The method of claim 2, further comprising, prior to processing the group feature, the scene sequence feature, and the scene feature of the candidate content to obtain scene recommendation index information for the candidate content: enhancing the scene characteristics and the global characteristics of the historical interaction content based on the global characteristics and the scene characteristics of the candidate content through a content similarity attention enhancing characteristic layer in the content recommendation model to obtain enhanced characteristics of the historical interaction content; The processing the group feature, the scene sequence feature and the scene feature of the candidate content to obtain scene recommendation index information of the candidate content includes: And processing the group characteristics, the scene sequence characteristics, the scene characteristics of the candidate contents and the enhancement characteristics of the historical interaction contents to obtain the scene recommendation index information.
- 4. The method according to claim 3, wherein the enhancing the scene feature and the global feature of the history interactive content based on the global feature and the scene feature of the candidate content to obtain the enhanced feature of the history interactive content includes: The global features and the scene features of the candidate content are fused to obtain the fusion features of the candidate content, and the scene features and the global features of the history interaction content are fused to obtain the fusion features of the history interaction content; comparing the fusion characteristics of the historical interaction content with the fusion characteristics of the candidate content respectively to obtain the content similarity of the historical interaction content and the candidate content; And weighting the fusion characteristics of the historical interaction content according to the content similarity to obtain the enhancement characteristics of the historical interaction content.
- 5. The method of claim 2, further comprising, prior to processing the group feature, the scene sequence feature, and the scene feature of the candidate content to obtain scene recommendation index information for the candidate content: the scene sequence features and the global sequence features are fused through a sequence fusion attention layer in the content recommendation model, so that fusion sequence features are obtained; the processing the group feature, the scene sequence feature and the scene feature of the candidate content to obtain scene recommendation index information of the candidate content further comprises: and processing the group characteristics, the scene sequence characteristics, the scene characteristics of the candidate contents and the fusion sequence characteristics to obtain the scene recommendation index information.
- 6. A method for training a content recommendation model, the method comprising: The method comprises the steps of obtaining interaction information between a sample object and a plurality of sample contents in a target scene, wherein the plurality of sample contents comprise target sample contents and a historical sample content sequence, the target scene is any one of a plurality of recommended scenes, and the plurality of recommended scenes are obtained by dividing based on associated attribute information of the recommended contents; Respectively extracting features of the target sample content and the historical sample content sequence through a global feature layer and a scene feature layer in a content recommendation model to be trained corresponding to the target scene to obtain scene features and global features of the historical sample content and the target sample content; the scene features characterize features that affect interaction of the sample object with the sample content in the target scene, and the global features characterize features that affect interaction of the sample object with the sample content in the plurality of scenes; Respectively encoding scene features and global features of the historical sample content by a global sequence encoder and a scene sequence encoder in the content recommendation model to be trained to obtain scene sequence features and global sequence features of the historical sample content sequence, wherein the scene sequence features represent transfer features among specific contents in the target scene, and the global sequence features represent transfer features among the contents in the plurality of recommendation scenes; Comparing the scene sequence characteristics with prototype characteristics of a plurality of predetermined group prototypes through a group prototype attention layer in the content recommendation model to be trained to obtain group similarity between the scene sequence characteristics and the prototype characteristics of each group prototype; Processing the group characteristics, the scene sequence characteristics, the global sequence characteristics, the scene characteristics and the global characteristics of the target sample content through an information determining unit in the content recommendation model to be trained to obtain recommendation index information of the target sample content in the target scene; And training the content recommendation model to be trained based on the recommendation index information and the interaction information between the sample object and the target sample content to obtain a content recommendation model corresponding to the target scene.
- 7. The method of claim 6, wherein prototype features of the plurality of population prototypes are determined by: Acquiring scene sequence features of a sample content sequence interacted by a plurality of sample objects under a plurality of sample scenes to obtain a plurality of scene sequence features; Determining current scene sequence features in the scene sequence features and current prototype features of a plurality of preset group prototypes; adjusting current prototype features of a plurality of preset group prototypes according to the current scene sequence features to obtain adjusted prototype features of each group prototype; And obtaining difference information between the adjusted prototype features of the two-group prototypes, when the difference information does not meet preset conditions, determining the next scene sequence feature in the scene sequence features as a new scene sequence feature, determining the adjusted prototype feature as a new prototype feature, and returning to the step of adjusting the current prototype features of the preset multiple-group prototypes according to the current scene sequence feature until the difference information between the current prototype features of the two-group prototypes meets the preset conditions, thereby obtaining the prototype features of each group prototype.
- 8. The method of claim 6, wherein training the content recommendation model to be trained based on the recommendation index information and interaction information between the sample object and the target sample content to obtain the content recommendation model corresponding to the target scene comprises: Determining a sample type of the target sample content based on interaction information between the sample object and the target sample content, wherein the sample type comprises positive sample content and negative sample content, the positive sample content represents the content of the sample object subjected to positive feedback, and the negative sample content represents the content of the sample object subjected to negative feedback; acquiring a loss value between recommendation index information of positive sample content and recommendation index information of negative sample content; And training the content recommendation model to be trained based on the loss value until the preset training times or the loss value converges, so as to obtain the content recommendation model corresponding to the target scene.
- 9. A content recommendation device, the device comprising: the system comprises an acquisition unit, a recommendation unit and a recommendation unit, wherein the acquisition unit is configured to execute acquisition of a historical interaction content sequence and candidate content of an object to be recommended in a target scene, the target scene is any one of a plurality of recommendation scenes, and the plurality of recommendation scenes are partitioned based on association attribute information of the recommendation content; the content feature extraction unit is configured to perform feature extraction on the historical interaction content sequence and the candidate content through a global feature layer and a scene feature layer in the content recommendation model to obtain scene features and global features of the historical interaction content and the candidate content; the scene characteristics represent the characteristics which influence the interaction of the object to be recommended and the candidate content in the target scene, and the global characteristics represent the characteristics which influence the interaction of the object to be recommended and the candidate content in the multiple scenes; The encoding unit is configured to execute encoding of scene features and global features of the historical interaction content through a global sequence encoder and a scene sequence encoder in the content recommendation model respectively to obtain scene sequence features and global sequence features of the historical interaction content sequence, wherein the scene sequence features represent transfer features among the specific contents in the target scene, and the global sequence features represent transfer features among the contents in the plurality of recommendation scenes; A group feature extraction unit configured to perform comparing, through a group prototype attention layer in the content recommendation model, the scene sequence feature with prototype features of a plurality of group prototypes determined in advance, to obtain group similarities between the scene sequence feature and the prototype features of the group prototypes, and performing weighted average on the prototype features of the group prototypes through the group similarities, to obtain group features of the object to be recommended; A recommendation index determining unit configured to perform processing of the group feature, the scene sequence feature, the global sequence feature, and the scene feature and global feature of the candidate content by the information determining unit in the content recommendation model to obtain recommendation index information of the candidate content in the target scene; and the recommending unit is configured to execute the step of determining target recommended content aiming at the object to be recommended from the candidate content based on the recommended index information.
- 10. A training device for a content recommendation model, the device comprising: The system comprises a sample acquisition unit, a sample processing unit and a sample processing unit, wherein the sample acquisition unit is configured to acquire interaction information between a sample object and a plurality of sample contents in a target scene, the plurality of sample contents comprise target sample contents and a historical sample content sequence, the target scene is any one of a plurality of recommended scenes, and the plurality of recommended scenes are partitioned based on associated attribute information of the recommended contents; The content feature extraction unit is configured to execute feature extraction on the target sample content and the historical sample content sequence through a global feature layer and a scene feature layer in a content recommendation model to be trained corresponding to the target scene to obtain scene features and global features of the historical sample content and the target sample content; The encoding unit is configured to execute encoding of scene features and global features of the historical sample content through a global sequence encoder and a scene sequence encoder in the content recommendation model to be trained to obtain scene sequence features and global sequence features of the historical sample content sequence; The group feature extraction unit is configured to execute a group prototype attention layer in the content recommendation model to be trained, compare the scene sequence feature with prototype features of a plurality of group prototypes determined in advance to obtain group similarity between the scene sequence feature and the prototype features of each group prototype; the recommendation index determining unit is configured to execute the processing of the group feature, the scene sequence feature, the global sequence feature, and the scene feature and the global feature of the target sample content by the information determining unit in the content recommendation model to be trained to obtain recommendation index information of the target sample content in the target scene; The model training unit is configured to perform training on the content recommendation model to be trained based on the recommendation index information and the interaction information between the sample object and the target sample content, and obtain a content recommendation model corresponding to the target scene.
- 11. An electronic device, comprising: A processor; a memory for storing the processor-executable instructions; Wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 8.
- 12. A computer readable storage medium, characterized in that instructions in the computer readable storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 8.
- 13. A computer program product comprising instructions which, when executed by a processor of an electronic device, enable the electronic device to perform the method of any one of claims 1 to 8.
Description
Content recommendation method, training method and device of content recommendation model Technical Field The disclosure relates to the field of computer technology, and in particular, to a content recommendation method, a training method and device of a content recommendation model, an electronic device, a storage medium and a program product. Background With the development of new media technologies, research on how to provide higher quality information and services to users through terminals has become a research hotspot in the current computer field. Currently, most new media applications are provided with a plurality of scenes/channels for providing recommended content for users, so as to meet different interests of the users, for example, on a short video platform, there may be a co-city content recommendation scene, a focus content recommendation scene, a carefully chosen content recommendation scene, a live content recommendation scene, etc., and sample interaction data amounts of the same user under different scenes may be different, so in order to improve the quality of the recommended content, content recommendation needs to be performed by crossing scenes. The current method for recommending the content across scenes is mostly realized based on a bidirectional learning mechanism, namely, information is transmitted between two related scenes in an iterative mode at the same time until the learning process is stable. However, this approach requires one user to interact with both scenes at the same time, i.e. requires paired content from both scenes as input, but in practice it is unreasonable to require pairs of content sequences in both scenes as paired input, since the content sequences in both scenes, while belonging to the same user, tend to be independent of each other. Thus, this two-way learning mechanism by mixing the content sequences of two scenes is theoretically difficult to produce better performance in non-overlapping user scenes. Disclosure of Invention The disclosure provides a content recommendation method, a training method of a content recommendation model, a training device of the content recommendation model, an electronic device, a storage medium and a program product, so as to at least solve the problem that a cross-scene content recommendation method in the related art is difficult to generate better performance in a non-overlapping user scene. The technical scheme of the present disclosure is as follows: according to a first aspect of an embodiment of the present disclosure, there is provided a content recommendation method, including: The method comprises the steps of obtaining a historical interaction content sequence and candidate content of an object to be recommended under a target scene, wherein the target scene is any one of a plurality of recommended scenes, and the plurality of recommended scenes are obtained by dividing based on association attribute information of the recommended content; The method comprises the steps of respectively extracting features of a historical interaction content sequence and candidate content through a global feature layer and a scene feature layer in a content recommendation model to obtain scene features and global features of the historical interaction content and the candidate content, wherein the scene features represent features which influence interaction between the object to be recommended and the candidate content in the target scene, and the global features represent features which influence interaction between the object to be recommended and the candidate content in the multiple scenes; Respectively encoding the scene characteristics and the global characteristics of the historical interaction content by a global sequence encoder and a scene sequence encoder in the content recommendation model to obtain scene sequence characteristics and global sequence characteristics of the historical interaction content sequence; extracting features of scene sequence features of the historical interaction content sequence through a group prototype attention layer in the content recommendation model to obtain group features of the object to be recommended; processing the group characteristics, the scene sequence characteristics, the global sequence characteristics, the scene characteristics and the global characteristics of the candidate content by an information determining unit in the content recommendation model to obtain recommendation index information of the candidate content in the target scene; and determining target recommended content aiming at the object to be recommended from the candidate content based on the recommended index information. In an exemplary embodiment, the feature extraction of the scene sequence feature of the historical interaction content sequence to obtain the group feature of the object to be recommended includes: obtaining prototype features of a plurality of predetermined population prototypes; Compari