Search

CN-116975419-B - Session recommendation method, device, equipment and storage medium

CN116975419BCN 116975419 BCN116975419 BCN 116975419BCN-116975419-B

Abstract

The application discloses a session recommendation method, a device, equipment and a storage medium, wherein the method comprises the steps of obtaining a session recommendation model, an input session and target items, wherein the session recommendation model at least comprises a general interest generator, a short-term interest generator and a distance generator, simulating a general interest code of the input session by using an unsupervised agent of the general interest generator, obtaining a short-term interest code of the input session by using a multi-head attention mechanism of the short-term interest generator, and determining a different score between the input session and each target item in a target item set by using the distance generator based on the general interest code, the short-term interest code and the target item so as to obtain a recommendation result of the input session.

Inventors

  • BEI CHENYUAN
  • CHEN XIANGJUN
  • ZHANG ZHONGYU
  • CHEN XIAN
  • SONG HUAHUA
  • ZHOU XINHUA

Assignees

  • 中移(杭州)信息技术有限公司
  • 中国移动通信集团有限公司

Dates

Publication Date
20260505
Application Date
20221026

Claims (8)

  1. 1. A method of conversational recommendation for predicting a next item of interest to a user from a click sequence of recent items of the user, the method comprising: Acquiring a session recommendation model, an input session and a target item set, wherein the session recommendation model at least comprises a general interest generator, a short-term interest generator and a distance generator; simulating a general interest encoding of the input session with an unsupervised agent of the general interest generator; acquiring short-term interest codes of the input session by utilizing a multi-head attention mechanism of the short-term interest generator; Projecting the short-term interest codes and the target item sets to the hyperplane of the unsupervised agent respectively by using the distance generator to obtain target short-term interest codes and target item codes; Acquiring an aggregate value of the general interest codes and the target short-term interest codes and a distance between the aggregate value and the target item codes by using the distance generator; Determining a dissimilarity score between the input session and each target item in the target item set based on the distance, and determining a target item with the smallest dissimilarity score in the target item set as a recommendation result of the input session; Wherein the general interest generator comprises at least an encoder network, a normalized exponential function with temperature coefficients, and the unsupervised agent, training the general interest generator comprising: Acquiring a training set and an agent embedding set; In the training process, inputting the session in the training set into the encoder network to obtain a set of probability vectors; converting the probability vector into a skewed probability distribution using the normalized exponential function with temperature coefficient; the unsupervised agent is determined in the agent embedded set based on a mapping relationship of the skew probability distribution and the agent embedded set.
  2. 2. The method of claim 1, wherein the acquiring the training set comprises: Acquiring an original data set; Filtering the sessions with the length smaller than the length threshold value and the sessions with the occurrence times smaller than the frequency threshold value in the original data set to obtain a target data set; and carrying out segmentation processing on the target data set to obtain a training set and a testing set, wherein the training set and the testing set comprise sequences and labels of the sequences.
  3. 3. The method of claim 1, wherein the converting the probability vector into a skewed probability distribution using a normalized exponential function with a temperature coefficient comprises: acquiring an initial temperature coefficient of the temperature coefficient; The probability vector is converted to a skewed probability distribution using a normalized exponential function with the initial temperature coefficient, wherein the skewed probability distribution approximates the hard distribution of Shan Re vectors.
  4. 4. The method of claim 1, wherein the method further comprises: training the session recommendation model by using a hinge loss function; during training, orthogonal regularization and distance regularization with weights are added to the objective function.
  5. 5. The method of claim 1, wherein, And establishing an evaluation system comprising hit rate indexes and average reciprocal ranks so as to optimize the session recommendation model through the evaluation indexes.
  6. 6. A conversational recommendation apparatus for predicting a next item of interest to a user from a click sequence of recent items of the user, the apparatus comprising: The system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a session recommendation model, an input session and a target item, and the session recommendation model at least comprises a general interest generator, a short-term interest generator and a distance generator; the simulation module is used for simulating the general interest codes of the input session by using an unsupervised agent of the general interest generator, wherein the general interest generator at least comprises an encoder network, a normalized exponential function with a temperature coefficient and the unsupervised agent; a second acquisition module for acquiring short-term interest codes of the input session using a multi-head attention mechanism of the short-term interest generator; A projection sub-module in the first determining module is used for respectively projecting the short-term interest codes and the target item sets to the hyperplane of the unsupervised agent by using the distance generator to obtain target short-term interest codes and target item codes; A first obtaining sub-module in the first determining module, configured to obtain, by using the distance generator, a distance between the aggregate value of the general interest code and the target short-term interest code and the target item code; A determining submodule in the first determining module is used for determining a dissimilarity score between the input session and each target item in the target item set based on the distance, and determining a target item with the smallest dissimilarity score in the target item set as a recommendation result of the input session; The third acquisition module is used for acquiring a training set and an agent embedded set; The input module is used for inputting the session in the training set into the encoder network in the training process to obtain a group of probability vectors; a conversion module for converting the probability vector into a skewed probability distribution using the normalized exponential function with temperature coefficient; and the second determining module is used for determining the unsupervised agent in the agent embedded set based on the mapping relation between the deflection probability distribution and the agent embedded set.
  7. 7. An electronic device comprising a memory and a processor, the memory storing a computer program executable on the processor, characterized in that the processor implements the steps of the method of any one of claims 1 to 5 when the program is executed.
  8. 8. A storage medium storing executable instructions for causing a processor to perform the steps of the method of any one of claims 1 to 5.

Description

Session recommendation method, device, equipment and storage medium Technical Field The embodiment of the application relates to the field of artificial intelligence, and relates to a session recommendation method, a session recommendation device, session recommendation equipment and a storage medium. Background With the rapid development of technologies such as cloud computing, big data, the Internet of things and the like, the big data volume on the Internet shows explosive growth. In this age of information explosion, many users are burdened with information overload, and therefore, recommendation systems are required to help users filter information. However, the conventional recommendation system needs to rely on long-term operation data of the user to analyze, obtain long-term static preferences of the user, and then recommend the user through the recommendation system. Many users are reluctant to register or log in view of complicated operation procedures or fear of privacy disclosure. The next action of the user depends not only on the long-term static preferences but also on the current interests, which can be deduced from the recent interactions, and thus session-based recommendation systems have evolved. Session recommendation is a method for predicting the next item of interest of the user from the click sequence of the recent items of the user, and generally used methods can be summarized as a markov chain, a recurrent neural network (Recursive Neural Network, RNN), and a graph neural network (Graph Neural Network, GNN). A markov chain is a classical approach which assumes that the next action depends on the last or last few actions. The RNN method models the sequential behaviors and main purposes of the user at the same time, captures the general interests of the user from the long-term memory of the session context, and meanwhile, some methods consider the repetitive consumption phenomenon, introduce a repetitive exploration mechanism, and can remarkably improve the performance under the repetitive session scene. The GNN method mainly constructs a session diagram through a session sequence, and acquires the dependency relationship between adjacent items. Markov chains are a classical approach, but fail to take advantage of long sequences of user behavior, easily leading to data sparseness problems. The RNN-based model performs better than the convolutional neural network (Convolutional Neural Networks, CNN) -based model, but it is difficult to learn the dependency from long distances, and as the session sequence becomes longer, the performance of the RNN-based method drops significantly. While GNN solves the problem that RNN cannot learn over long distances by considering the conversion of items, GNN-based methods can only learn the dependency between adjacent items, and cannot learn the global dependency. Disclosure of Invention In view of the above, the embodiments of the present application provide a session recommendation method, apparatus, device and storage medium. The technical scheme of the embodiment of the application is realized as follows: in a first aspect, an embodiment of the present application provides a session recommendation method, where the method includes: Acquiring a session recommendation model, an input session and a target item set, wherein the session recommendation model at least comprises a general interest generator, a short-term interest generator and a distance generator; simulating a general interest encoding of the input session with an unsupervised agent of the general interest generator; acquiring short-term interest codes of the input session by utilizing a multi-head attention mechanism of the short-term interest generator; And determining a dissimilarity score between the input session and each target item in the target item set based on the general interest code, the short-term interest code, and the target item by using the distance generator to obtain a recommendation result of the input session. In a second aspect, an embodiment of the present application provides a session recommendation apparatus, where the apparatus includes: The system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is used for acquiring a session recommendation model, an input session and a target item, and the session recommendation model at least comprises a general interest generator, a short-term interest generator and a distance generator; A simulation module for simulating a general interest code of the input session using an unsupervised agent of the general interest generator; a second acquisition module for acquiring short-term interest codes of the input session using a multi-head attention mechanism of the short-term interest generator; And the determining module is used for determining a dissimilarity score between the input session and the target item based on the general interest