[go: up one dir, main page]

CN119168793B - Project recommendation method, device, medium and computer equipment - Google Patents

Project recommendation method, device, medium and computer equipment Download PDF

Info

Publication number
CN119168793B
CN119168793B CN202411192723.6A CN202411192723A CN119168793B CN 119168793 B CN119168793 B CN 119168793B CN 202411192723 A CN202411192723 A CN 202411192723A CN 119168793 B CN119168793 B CN 119168793B
Authority
CN
China
Prior art keywords
user
embedding
sequence
interaction
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202411192723.6A
Other languages
Chinese (zh)
Other versions
CN119168793A (en
Inventor
莫先
戚航
乃永强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningxia University
Original Assignee
Ningxia University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningxia University filed Critical Ningxia University
Priority to CN202411192723.6A priority Critical patent/CN119168793B/en
Publication of CN119168793A publication Critical patent/CN119168793A/en
Application granted granted Critical
Publication of CN119168793B publication Critical patent/CN119168793B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/041Abduction

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本发明公开了一种项目推荐方法、装置、介质和计算机设备,涉及项目推荐技术领域。本发明先获取各用户在历史时刻的历史交互项目序列,并确定其对应的原始用户嵌入,从而基于扩散模型的应用推断用户之间的交互强弱,对用户嵌入进行重构,并基于重构后的用户嵌入构建用户交互图,从而基于用户交互图,针对每个用户,根据其邻居用户的历史交互项目序列确定该用户的增强序列并基于此对所述用户进行项目推荐。本发明通过推断用户之间的交互强弱,避免原始用户间交互带来的噪声导致在增强序列中引入噪声项目,从而提高了对用户的推荐准确性。

The present invention discloses a project recommendation method, device, medium and computer equipment, and relates to the technical field of project recommendation. The present invention first obtains the historical interaction project sequence of each user at a historical moment, and determines the corresponding original user embedding, thereby inferring the strength of interaction between users based on the application of a diffusion model, reconstructing the user embedding, and constructing a user interaction graph based on the reconstructed user embedding, thereby based on the user interaction graph, for each user, determining the user's enhanced sequence according to the historical interaction project sequence of its neighbor users and recommending projects to the user based on this. The present invention improves the accuracy of recommendations to users by inferring the strength of interaction between users, avoiding the introduction of noise projects in the enhanced sequence caused by the noise brought by the original user interaction.

Description

Project recommendation method, device, medium and computer equipment
Technical Field
The present invention relates to the field of project recommendation technologies, and in particular, to a project recommendation method, apparatus, medium, and computer device.
Background
Generally, the background of the sequential recommendation technique is closely related to the development of personalized recommendation systems. With the popularity of the internet and the accumulation of massive amounts of user data, conventional content-based or collaborative filtering recommendation systems are increasingly becoming aware of limitations, such as the inability to accurately capture the time-series behavior and evolution of users. Thus, sequential recommendation techniques have been developed to model the historical and current behaviors of a user using time-series information of the user's behaviors in combination with techniques such as sequential models, reinforcement learning, recurrent neural networks, etc., so that the user's future preferences and behaviors can be predicted more accurately. The development of the technical background enables the recommendation system to be more accurately adapted to the personalized demands of users, and is widely applied to the fields of electronic commerce, social media, audio and video services and the like.
In the prior art, sequence recommendations aim to predict the user's next item from a user's historical sequence of items, thereby knowing the user's interest evolution process. It has been widely used in various online platforms such as streaming media, electronic commerce, social networks, etc. Traditional sequence recommendation (Sequence Recommender, SR) methods mainly use markov chains to learn time-interaction transitions, such as MC-RGN, SPMC, etc. Recent studies have focused on depth sequence recommendation models and achieved satisfactory results. However, in a real-world scenario, most users interact with only a limited number of items, resulting in data sparsity issues, which hampers the development of sequence recommendations.
Data augmentation is an intuitive approach in dealing with data sparsity because it can enrich the interaction items of each user. Thus, several sequence level data enhancement models are presented that generate new sequences or users to solve the data sparsity problem. For example, CASR generates high quality sequences of user behavior that are trained based on the original sequence and the generated sequences of user behavior, respectively. The L2Aug carries out iterative training based on a sequence recommendation model and a sequence generator through reinforcement learning. Recently, chen et al generated new sequences of user behavior using random or frequency-based methods, which sequences were still trained based on the original sequence and the new sequence.
However, due to noise interactions present in the original user-user interaction, noise items are generated in the enhanced sequence, which seriously affects the quality of the user enhanced interaction sequence, so that the item recommendation accuracy is deteriorated.
Disclosure of Invention
Based on the foregoing, it is necessary to provide a method, an apparatus, a medium and a computer device for recommending items.
The invention adopts the following technical scheme:
the invention provides a project recommending method, which comprises the following steps:
Acquiring a historical interaction item sequence corresponding to an item of interaction of each user at a historical moment, determining original user embedding according to the historical interaction item sequence, and determining initial distribution representation of the original user embedding;
Gradually adding noise into the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, and inputting the Gaussian noise into a transducer model to obtain a first prediction embedding of the original user embedding; splicing the first prediction embedding and Gaussian noise, inputting a transducer model to obtain a second prediction embedding for the original user embedding, and training the transducer model by taking the deviation between the minimized second prediction embedding and the original user embedding as an optimization target to obtain a guiding diffusion model;
The method comprises the steps of inputting an initial distribution representation of original user embedding into a guide diffusion model to obtain reconstructed user embedding, determining the similarity between users according to the difference between the reconstructed user embedding, and determining the interaction existing between the users according to a preset similarity threshold value to construct a user interaction graph;
For each user, determining a neighbor user set of the user according to a user interaction diagram, and determining an enhancement sequence of the user according to a historical interaction item sequence of each neighbor user; and merging the enhanced sequence with the historical interaction project sequence of the user, and recommending the project to the user according to the merged sequence.
Optionally, the determining the original user embedding according to the historical interaction item sequence specifically includes:
determining the average value of the historical interaction item sequences of all users and embedding the average value as an original user by the following steps:
Where e u represents the original user embedding of user u, and e k represents the sequence value of the items in the user's historical interactive item sequence.
Optionally, adding noise in the original user embedding until the original user embedding is diffused into gaussian noise specifically includes:
adding noise in the original user embedding until the original user embedding is spread as gaussian noise by:
xs←q(xs|x0,s);
Where x s represents noisy user embedding that has undergone s diffusion steps, x 0 represents an initial distribution representation of the original user embedding, s represents the diffusion step, and q () represents the approximate posterior distribution in the variance inference.
Optionally, the determining the similarity between the users according to the difference between the reconstructed user embedments, so as to determine whether there is interaction between the users according to a preset similarity threshold, specifically includes:
And determining the similarity between the users according to the difference between the reconstructed user embedments by the following steps:
determining whether interaction exists among the users according to a preset similarity threshold through the following formula:
Sim(ui,uj)≥τ;
Wherein Sim (u i,uj) represents the similarity between user u i and user u j, Representing a similarity measure function that is a function of the similarity measure,Representing the user embedding after user u i has been reconstructed,Representing the user embedding after the reconstruction of user u j, τ representing a preset similarity threshold.
Optionally, for each user, determining an enhancement sequence of the user according to the historical interaction item sequence of each neighbor user specifically includes:
for each user, determining an enhancement sequence of the user according to the historical interaction item sequence of each neighbor user by the following formula:
Saug=Γ({Con({ua,ub})∪Con({ua,uc})∪Con({ub,uc})∪...}),
{ua,ub,uc,...}=N(ui);
Where N (u i) represents the neighbor set of user u i, con () represents the common items between the historic interaction item sequences of each pair of neighbor users, Γ () represents the ordering of the items in the set by item occurrence frequency, and S aug represents the enhancement sequence of user u i.
The invention provides an item recommendation device, comprising:
The acquisition module is used for acquiring a historical interaction item sequence corresponding to the item with interaction of each user at the historical moment, determining the embedding of the original user according to the historical interaction item sequence, and determining the initial distribution representation of the embedding of the original user;
The training module is used for gradually adding noise into the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, inputting the Gaussian noise into a transducer model to obtain a first prediction embedding of the original user embedding;
The interaction graph construction module is used for inputting the initial distribution representation of the original user embedding into the guide diffusion model to obtain the reconstructed user embedding, determining the similarity between the users according to the difference between the reconstructed user embedding, and determining the interaction existing between the users according to a preset similarity threshold value to construct a user interaction graph;
and the recommendation module is used for determining a neighbor user set of each user according to the user interaction graph, determining an enhancement sequence of each user according to the historical interaction item sequence of each neighbor user, combining the enhancement sequence with the historical interaction item sequence of the user, and recommending the user according to the combined sequence.
The present invention provides a computer readable storage medium storing a computer program which when executed by a processor implements the above item recommendation method.
The invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the program is executed by the processor to realize the project recommendation method.
The at least one technical scheme adopted by the invention can achieve the following beneficial effects:
According to the method, a historical interaction item sequence of each user at a historical moment is firstly obtained, and corresponding original user embedding is determined, so that interaction strength among the users is deduced based on application of a diffusion model, user embedding is reconstructed, a user interaction diagram is built based on the reconstructed user embedding, therefore, based on the user interaction diagram, for each user, an enhancement sequence of the user is determined according to the historical interaction item sequence of a neighbor user, and item recommendation is performed on the user based on the enhancement sequence. According to the method and the device, the interaction strength between the users is deduced, so that noise items are prevented from being introduced into the enhancement sequence due to noise caused by interaction between the original users, and the recommendation accuracy of the users is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a schematic diagram of an original sequence to an amplified sequence according to the present invention;
FIG. 2 is a schematic flow chart of a project recommendation method provided by the invention;
FIG. 3 is a schematic diagram of an overall structure GDiffuASR according to the present invention;
FIG. 4 is a diagram illustrating a GDiffuHI data flow provided by the present invention;
FIG. 5 is a schematic diagram of data augmentation provided by the present invention;
FIG. 6 is a schematic diagram of an item recommendation device according to the present invention;
fig. 7 is a schematic diagram of a computer device for implementing the project recommendation method provided by the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to specific embodiments of the present invention and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
In general, sequential recommendations aim to infer a user's next item based on the user's historical interaction items, which have attracted a great deal of attention due to their significant commercial value. However, in a real scenario, sequence recommendations often suffer from data sparsity issues.
Data augmentation is an intuitive approach in dealing with data sparsity because it can enrich the interaction items of each user. Thus, several sequence level data enhancement models are presented that generate new sequences or users to solve the data sparsity problem. For example, CASR generates high quality sequences of user behavior that are trained based on the original sequence and the generated sequences of user behavior, respectively. The L2Aug carries out iterative training based on a sequence recommendation model and a sequence generator through reinforcement learning. Recently, chen et al generated new sequences of user behavior using random or frequency-based methods, which sequences were still trained based on the original sequence and the new sequence. However, the sequence-level data enhancement model is less convenient because it requires training of the original and new sequences separately, and the training process is more complex than training the model directly based on the augmented data set. To address this problem, project level data enhancement models have emerged that generate new projects for each user's interaction sequence and train the sequence recommendation model directly on the augmented data set. For example, BARec, using knowledge enhancement and bi-directional time enhancement strategies to generate pseudo-prior items, can learn item semantic relevance and capture user preferences. ASReP creates virtual items by pre-training transformers and uses these augmented sequences to infer the next item. Recently SPARSEENNET generated robust enhancement items in hidden space for sequence recommendation by an countermeasure generation model. However, most existing approaches represent enhancement items with fixed vectors, which have limited ability to capture various preferences of the user, possibly resulting in drift in the distribution of the original sequence of items.
Fig. 1 is a schematic diagram of an original sequence to an augmented sequence according to the present invention, and fig. 1 reveals that an original user-user interaction diagram with noise may seriously affect the quality of the user-enhanced interaction sequence. Specifically, circles in fig. 1 represent users, and hexagons represent items. The line between the users represents the existing user interaction, while the orange dotted line represents the noise interaction, the rectangular separation of two pieces of content, the left side represents the original sequence, and the right side represents the augmented sequence. Assume that in the original interaction sequence shown on the left, there is a pairwise interaction between three users, where u i and u k are noisy interactions. The graph homogeneity assumption indicates that the interrelated users should generally have more similar interests and preferences. Thus, the user may be more inclined to have items of user-to-user interaction as enhanced items for each sequence of user interactions, as shown on the right side of FIG. 1. Thus, noise items (orange hexagons) may be generated in the enhanced sequence due to noise interactions present in the original user-user interaction, which severely affects the quality of the user enhanced interaction sequence, possibly deteriorating the recommendation performance. Fortunately, the original interaction sequence of the user reflects the user's preferences to a large extent even if there are few noisy items in the original interaction sequence. Thus, rather than utilizing the original user-user interactions that always have noise present, the noisy interactions in the data enhancement can be mitigated by learning user preferences from the original interaction sequence to infer strong and weak interactions between users. However, existing work does not contemplate directly utilizing the original interaction sequence of users to infer interactions between users for data augmentation, which may result in introducing more noise items in the augmentation sequence and thus degrading recommendation performance.
The sequential recommendation model models the sequential dependence of the user's historical behavior to capture the user's dynamic preferences for recommended items that may be of next interest. The traditional method mainly adopts a Markov chain to learn time interaction conversion. For example, SPMC (social aware personalized markov chain) introduces a personalized markov chain combining order and social information for sparse sequence recommendation, whereas MC-RGN integrates time-series networks and markov chains for sequence recommendation. Recent studies have focused on depth sequence recommendation models, as they exhibit promising results. TiDA-GCN proposes an enhanced domain-aware graph convolution network for cross-domain sequence recommendation, while Li et al learn the static feature embedding of nodes through double contrast learning for sequence recommendation. Recently, researchers have begun focusing on self-attention mechanisms for sequence recommendation due to their strong ability to model sequences. For example SASRec introduced a self-attention based order model to capture long-term semantics, while BERT4Rec employs bi-directional self-attention to learn user behavior sequences for sequence recommendation. Recently, TGT has been used for multi-behavioral sequence recommendation by capturing dynamic user-project interactions using self-attention mechanisms. ADT adopts self-attention mechanism to provide an adaptive decoupling transformer structure for sequence recommendation. Although the sequence recommendation model has made some progress, the data sparseness problem limits further improvement.
Currently, there are a variety of item sequence recommendation methods, such as:
A continuous time sequence recommendation method based on time graph collaborative conversion comprises the specific steps of S 1, collecting a data set of user information, project information and time information, constructing a user behavior bipartite graph, dividing the data set into a training set and a verification set, S 2, constructing a time sequence effect model according to the time information, calculating correlation between two times, S 3, constructing an information processing layer, generating a collaborative signal model, taking the user information, the project information and the time information as input, generating user query information and project query information, S 4, constructing a time sequence collaborative attention model, generating a weight coefficient by calculating correlation between a historical interaction project and current time user query information, S 5, integrating the weight coefficient and the user query information in a linear mode, generating historical time sequence information, S 6, integrating the user query information and the project query information with the historical time sequence information respectively through a feedforward neural network, generating final user time sequence information and project time sequence information respectively, S 7, generating a coefficient according to the user time sequence information and the project information, and optimizing by using a BPR loss.
A self-attention sequence recommendation algorithm based on film type time intervals is disclosed (CN 117807305A), and is characterized by comprising the following steps of S 1, preparing a dataset, preprocessing files in the dataset, generating a data format which can be used by the algorithm, S 2, intercepting a user-film interaction sequence and a corresponding time sequence in the dataset, S 3, calculating a same type time interval matrix according to time stamps of the user-film interaction sequence in the dataset, S 4, training the user-film interaction sequence, absolute position information of a film and the type time interval matrix by using a multi-head self-attention mechanism to obtain a prediction model, S 5, fitting the model by using a convolutional neural network, and then predicting the next film.
A deep reinforcement learning-based sequence recommendation algorithm considering user future preference (CN 115600009A) specifically comprises the following steps of S 1, generating general preference (history preference) of a user according to an interaction item set X U of a user U, wherein the interaction item set X u refers to the previous n item data interacted by the user, S 2, obtaining a relative future interaction sequence of a user neighbor according to an interaction item set X U of the user U through a neighbor sequence extraction module, obtaining the future preference of the user by utilizing the same method as S 1, S 3, combining the general preference (history preference) of the user obtained by S 1 and S 2 and the future preference of the user into comprehensive preference of the user through a attention network, constructing a Markov decision process as a state S t;S4 in deep reinforcement learning, and establishing a Q network, S 5, establishing a Double-DQN-based recommendation model and training, alternately updating the Double-DQN recommendation model, and reinforcing the depth learning-based sequence of the user preference according to claim 1 in the sequence of the user = { 38 }, wherein the depth learning-based sequence of the user preference is the deep reinforcement learning-based on the user sequence is in the time sequence of the user = { 38 }, and the sequence of the user } }, and the user is the time-ordered } }, wherein the state of the user is { 38 } }, and the method is a deep reinforcement learning-based on the user } }, and the method according to be obtained by the methodThe items that the user interacts with the user over the time step t are represented asWe first calculate the user embedding from the user history behavior, in order to capture the dynamic interaction sequence, we apply the cyclic neural network RNN introduced to the variable length user embedding calculation, we use the long and short term memory units LSTM as RNN basic unit capture time dynamics, each LSTM unit comprising at time t a memory cell c t, an output gate i t, a forgetting gate f t, an output gate o t calculated from the last hidden state h t-1 and the current input x t, [ f t,it,ot]=sigmoid(W[ht-1,xt ]), the memory cell c t updating part of the forgotten memory and adding new memory :It:It=tanh(V[ht-1,xt])ct=ft⊙ct-1+it·It, once the memory content is updated, the hidden state also updating h t=ot⊙tanh(ct) will be fused with the obtained user u feature information using the attention network to obtain the general preference (history preference) P history of the user u described in S 1.
Step 1, building a basic diffusion model based on a U-Net architecture, utilizing the existing disclosed highlight dataset as a dataset, carrying out forward diffusion and noise adding on a picture without highlight, updating parameters of the corresponding diffusion model, and storing the corresponding parameters in the diffusion model based on the U-Net architecture; step 2, defining a live no-highlight image of any size as X 0, defining an image containing a highlightDefining binary mask matrix identical to dimension and representing the position of ith P X P patch, randomly selecting one binary patch mask P i, and using said binary mask to make non-highlight image X 0 and highlight imageCutting to obtainAndRepresenting pairs of images from a training setStep 4, randomly selecting a time step t from uniform distribution and randomly selecting a noise E t from standard normal distribution, step 5, performing a gradient descent step, updating a relevant parameter theta by minimizing the difference between the noise predicted by a diffusion model based on a U-Net architecture and the actual noise, step 6, continuing to iterate the steps 2 to 5 until convergence is achieved, and finally returning theta as a model parameter after training is completed to obtain a trained conditional model E thetaStep 7, the image needing to be highlight removedThe noise adding process is carried out to obtain pure noise images with consistent size, the pure noise images and the pure noise images form basic input data of a recovery process, and then the condition model epsilon theta obtained by training in the step 6 is utilizedAnd (3) performing implicit sampling iteration, gradually recovering the noise image, and returning to remove the highlight clear image after the iteration is completed.
A personal image recommending method based on face recognition and data processing, publication number (CN 116127114A), is characterized by comprising the following steps of S 11, obtaining a face picture with makeup and constructing a data set of the face with makeup; S 12 obtaining facial masks of the face with makeup according to the data set of the face with makeup, S 13 obtaining facial features of the face with makeup through a trained self-encoder according to the data set of the face with makeup and the facial masks of the face with makeup, S 14 obtaining facial masks of the face with makeup according to photos of the face of a user, S 15 obtaining facial features of the face of the user through a trained self-encoder according to photos of the face of the user and the facial masks of the face of the user, S 16 constructing a graph structure according to the facial features with makeup and the facial features of the user, S 17 using the facial features of the user to initialize a clustering list, selecting one facial feature with the largest gain with the facial feature module of the user according to the graph structure, adding the facial feature with makeup in the clustering list to a clustering list, wherein each facial feature in the clustering list corresponds to a dressing capacity of the user, S 16 forming the rest nodes between the nodes in the clustering list and the rest nodes in the clustering list, wherein the rest nodes are more than 35 nodes in the clustering list, and repeating the steps S 18 and S 19 until the number of the nodes in the clustering list reaches a threshold alpha. And S 110, recommending the makeup corresponding to the makeup-carrying face features stored by the nodes in the clustering list to the user according to the sequence if the number of the nodes in the clustering list reaches a threshold alpha, recommending the next makeup corresponding to the makeup-carrying face features stored by the nodes in the clustering list if the user is not satisfied with the makeup, exiting the recommendation if the user selects a certain makeup, and returning to the step S 18;S111 if the user does not select any makeup in the clustering list, and returning to the step S 18 if the number of the nodes in the clustering list does not reach the threshold alpha.
A service recommendation method comprises the steps of 1, obtaining attribute information of an object to be recommended, 2, determining at least one service to be recommended corresponding to the object to be recommended according to the attribute information, 3, recommending the at least one service to be recommended to the object sequence to be recommended, and 4, responding to a confirmation result fed back by the object to be recommended for a target service in real time, configuring the target service for an application platform of the object to be recommended, wherein the target service is any one of the at least one service to be recommended.
In order to solve the above problems, the present invention proposes a pilot diffusion enhancement strategy to solve the data sparsity problem of the sequence recommendation (GDiffuASR). Specifically, GDiffuASR first establishes a guided diffusion model with user history interactions to guide the user to embed the reconstruction, which can effectively capture the current multiple preferences of the user. In more detail, GDiffuHI breaks down the user embedding, which is obtained by calculating the average of the user's original interaction sequence, into a gaussian distribution by adding noise during the diffusion phase. And feeding the noisy user embedding into an approximator based on user history interaction items, guiding the user embedding reconstruction to perform model training, and ensuring that the generated data is always beneficial to the diffusion enhancement model by the noisy user embedding. The user distribution representation may be obtained by iteratively inverting the pure gaussian noise using a well-trained approximator. The reconstructed user embedding is then utilized to dynamically infer strong and weak interactions between users to construct a user-user graph. In more detail, a user-embedded vector reconstructed using a similarity metric function (e.g., cosine similarity, manhattan distance, etc.) is used to calculate a similarity value between users. The greater the similarity value, the greater the likelihood of interaction between users and vice versa. And dynamically deducing strong and weak interaction between users by setting different similarity thresholds, constructing a user-user graph, and automatically adapting to data sets of different recommendation domains by adjusting the similarity thresholds. Next, using common items of the user neighbors as user enhancement items, data enhancement is performed based on the constructed user-user graph, which can effectively capture higher order relationships between users and items. Finally, the enhancement dataset fine-tunes the previously constructed diffusion model parameters for sequence recommendation without requiring a complex training process.
The following describes in detail the technical solutions provided by the embodiments of the present invention with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of a project recommending method in the present invention, which specifically includes the following steps:
S101, acquiring a historical interaction item sequence corresponding to the item where each user has interaction at the historical moment, determining the embedding of the original user according to the historical interaction item sequence, and determining the initial distribution representation of the embedding of the original user.
S102, adding noise in the original user embedding until the original user embedding is diffused into Gaussian noise, inputting the Gaussian noise into a transducer model to obtain a predicted embedding of the original user embedding, and training the transducer model by taking the deviation between the minimized predicted embedding and the original user embedding as an optimization target to obtain a guided diffusion model.
Generally, when performing item recommendation on a user, user preference can be inferred based on historical interaction items of the user and interactions between users to obtain items that may be of interest to the user so as to perform item recommendation.
Based on this, in one or more embodiments of the present invention, the server of the service platform may first obtain a historical interaction item sequence corresponding to the item that each user has interacted with at the historical moment.
For example, the set of users U= { U 1,u2,...,u|U| } and the set of items I= { I 1,i2,...,i|I| } may be obtained, and the historical interaction item sequence of user U may be defined asWhere n is the number of items in the user's historical sequence of interactive items. Multiple preferences of the user may be learned based on the user's historical interaction item sequence.
The invention firstly constructs a guiding diffusion model (GDiffuHI) with user history interaction items to guide the reconstruction embedded by a user, so that the current multiple preferences of the user can be effectively captured, as shown in fig. 4, and fig. 4 is a GDiffuHI data flow diagram in the invention. GDiffuHI includes three parts, 1) approximator f θ ()'s for user-embedded reconstruction, 2) diffusion (training) phase for integrating user-embedded guidance and injecting noise for robust approximator learning, 3) inverse process for user-embedded learning.
(1) Approximator-the use of a Transformer as an approximator f θ (), which benefits from its strong order-dependent modeling capabilities, for generating user-embedded reconstructionsThe following formula is shown:
Where [ z 1,...,zj,...,zn ] defines a distributed representation of the user' S historical interaction sequence S raw={i1,i2,...,in, and z j defines a representation of the item i j, which can be obtained by:
zj=eji⊙xs
Where e j defines a static item embedding for representing the inherent potential features contained in item i j, η i samples from a gaussian distribution, and ≡represents an element-wise product. During diffusion, x s is noisy user embedding that has undergone s diffusion steps. In the reverse phase, x s is the inverted user embedding. In this way, noisy user embedding x s adjusts the embedding of user history interaction item S raw, which may ensure that the generated data can always be beneficial to the diffusion enhancement model through user-embedded guidance, because x s is used as an auxiliary semantic signal.
(2) The diffusion (training) process, reverse operation, recovers the user embedding x 0 from the user' S historical interactive item sequence S raw. Thus, by adding noise to the original user-embedded e u during the diffusion phase, we break it down into a gaussian distribution, as shown by the following equation:
Where x 0 defines the initial distribution representation of the original user-embedded e u sampled from q (), s defines the diffusion step. The original user-embedded e u may be obtained by calculating the mean of the user' S original interaction sequence S raw, as shown in the following equation.
X s may be obtained according to a specific diffusion setting, which may reflect various preferences of the user. The representation can be adjusted using x s And training the approximator f θ (), through cross entropy loss, which strengthens the original user embedding e u near the user embedding reconstructed from the approximator
(3) Reverse procedure in which the user embedding x 0 is intended to be iteratively recovered from the pure gaussian noise x t, where t defines the number of diffusion steps. The representation is also adjusted using x t And feeds it into a well-trained approximator f θ () to estimateThe following formula is shown:
Then, the pure Gaussian noise x t is used and estimated To invert x t-1 from p (), and recursively repeat this process until x 0 is obtained, as shown in the following equation.
The server mentioned in the present invention may be a server provided on a service platform, or a device such as a desktop computer, a notebook computer, etc. capable of executing the solution of the present invention. For convenience of explanation, only the server is used as the execution subject.
And S103, inputting the initial distribution representation of the original user embedding into a guide diffusion model to obtain the reconstructed user embedding, determining the similarity between the users according to the difference between the reconstructed user embedding, and determining whether interaction exists between the users according to a preset similarity threshold value to construct a user interaction graph.
S104, determining a neighbor user set of each user according to a user interaction diagram, determining an enhancement sequence of each user according to a historical interaction item sequence of each neighbor user, combining the enhancement sequence with the historical interaction item sequence of the user, and recommending items to the user according to the combined sequences.
After the guided diffusion model is obtained, the server can reconstruct the user embedding, construct a user-user diagram by using the reconstructed user embedding, then generate an enhanced new sequence based on the constructed user-user diagram, and finally fine tune parameters of a previously constructed GDiffuHI model by using the new sequence for sequence recommendation.
(1) And constructing a user interaction diagram. Noise always exists in the current user interaction graph, the method and the device can infer strong and weak interaction between users by utilizing the reconstructed user embedding instead of utilizing the original user interaction graph to reconstruct a user-user graph G (U, E), so that the noise problem caused by the original user interaction graph is avoided. Here, U defines a set of users u= { U 1,u2,...,u|U| }, while E u×u defines a set of interactions (edges) between users. In particular, user-embedded vectors that can utilize reconstructionAndThe similarity value Sim (u i,uj) between users u i and u j is calculated. If Sim (u i,uj). Gtoreq.τ, then there is an edge between users u i and u j, and vice versa, as shown in the following formula:
Here the number of the elements is the number, A similarity measure function between users u i and u j, such as cosine similarity, manhattan distance, etc., is defined. WhileAndThe reconstructed user embeddings of users u i and u j are defined, respectively, which can be obtained by the GDiffuHI model. The larger the similarity value Sim (u i,uj), the greater the likelihood of interaction between the users u i and u j and vice versa. And dynamically deducing strong and weak interaction between users by setting various similarity thresholds tau, and constructing a user interaction graph. Setting a larger similarity threshold τ may infer stronger interactions between users and vice versa. In addition, the similarity threshold can be adjusted to automatically adapt to data sets with different sparsity in different recommendation fields, so that effective data enhancement is realized.
Based on the constructed user interaction graph G (U, E), the common items of the neighbors of the user can be utilized as the user enhanced items for data enhancement, as shown in FIG. 5, and FIG. 5 is a data enhancement schematic diagram in the invention. Specifically, the set of all neighbor users for the target user U i may be obtained from the user-user graph G (U, E) first according to:
C={ua,ub,uc,...}=N(ui)
where N (u i) is defined as the set c= { u a,ub,uc,... Then, the common item between each pair of neighbor users is returned as a target item for user enhancement, for data enhancement, as shown in the following formula:
Saug=Γ({Con({ua,ub})∪Con({ua,uc})∪Con({ub,uc})∪...})
Here, con () defines a common item between users. The gamma function is adopted to sort the items according to the occurrence frequency of the items, and the items with lower occurrence frequency can be truncated, so that the enhancement sequence S aug can be ensured to have close relation with the target user, and noise items are removed. Finally, the enhanced sequence S aug is inserted into the original sequence S raw, generating a new sequence S new for sequence recommendation.
Finally, the parameters of the model GDiffuHI constructed before can be adopted for sequence recommendation, so that the complex training process is avoided. Specifically, the approximation function f θ () may be employed to reconstruct the embedding of the target item e n+1, defined as generated using the enhanced new sequence S new This can be done by the following formula:
Wherein [ z -M,...,z-1 ] defines a distributed representation of the user-enhanced interaction sequence S aug={i-M,...,i-1 } can be based on the foregoing. During the diffusion phase, the target item embedding e n+1 can be corrupted into a Gaussian distribution by adding noise and incorporated into the target item embedding guide for approximator learning, which enhances the approach of the target item embedding e n+1 to the reconstructed target item The reverse process is used for target item prediction. Specifically, the restored target item insert y 0 may be mapped to a discrete item index space for recommendation.
Based on the project recommendation method shown in fig. 2, firstly, a historical interaction project sequence of each user at a historical moment is obtained, and corresponding original user embedment is determined, so that interaction strength among users is deduced based on application of a diffusion model, user embedment is reconstructed, a user interaction diagram is constructed based on the reconstructed user embedment, and therefore, based on the user interaction diagram, for each user, an enhancement sequence of the user is determined according to the historical interaction project sequence of a neighbor user, and project recommendation is performed on the user based on the enhancement sequence. According to the method and the device, the interaction strength between the users is deduced, so that noise items are prevented from being introduced into the enhancement sequence due to noise caused by interaction between the original users, and the recommendation accuracy of the users is improved.
Specifically, first, GDiffuHI based on diffusion is introduced to guide a user to embed and reconstruct, so that the current multiple preferences of the user are effectively captured, and generated data can always bring benefits to a diffusion enhancement model. And then, dynamically deducing strong and weak interaction between users by utilizing the reconstructed user embedding, constructing a user-user graph, and automatically adapting to data sets of different recommendation domains by adjusting a similarity threshold. In addition, the invention adopts the public items of the user neighbors as the user enhancement items, and can effectively capture the higher-order relation between the user and the items.
When the project recommendation method provided by the invention is applied, the project recommendation method can be executed without the sequence of the steps shown in fig. 2, and the specific execution sequence of the steps can be determined according to the needs, so that the project recommendation method is not limited by the invention.
The project recommending method provided for one or more embodiments of the present invention further provides a corresponding project recommending device based on the same thought, as shown in fig. 6.
Fig. 6 is a schematic diagram of an item recommendation device provided by the present invention, including:
The acquisition module 201 is configured to acquire a historical interaction item sequence corresponding to an item where each user has interaction at a historical moment, determine an original user embedding according to the historical interaction item sequence, and determine an initial distribution representation of the original user embedding;
The training module 202 is configured to gradually add noise in an initial distribution representation of the original user embedding until the original user embedding is diffused into gaussian noise, input the gaussian noise into a transducer model to obtain a first predicted embedding of the original user embedding;
The interaction graph construction module 203 is used for inputting the initial distribution representation of the original user embedding into the guide diffusion model to obtain the reconstructed user embedding, determining the similarity between the users according to the difference between the reconstructed user embedding, and determining the interactions existing between the users according to a preset similarity threshold value to construct a user interaction graph;
And the recommendation module 204 is used for determining a neighbor user set of each user according to the user interaction graph, determining an enhancement sequence of each user according to the historical interaction item sequence of each neighbor user, combining the enhancement sequence with the historical interaction item sequence of the user, and recommending the user according to the combined sequence.
For specific limitations of the item recommendation device, reference may be made to the above limitation of the item recommendation method, and the description thereof will not be repeated here. The respective modules in the above item recommendation apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
The present invention also provides a computer readable storage medium storing a computer program operable to perform the project recommendation method provided in fig. 2 above.
The invention also provides a schematic structure of the computer device shown in fig. 7, and as shown in fig. 7, the computer device includes a processor, an internal bus, a network interface, a memory and a nonvolatile memory, and may also include hardware required by other services. The processor reads the corresponding computer program from the nonvolatile memory into the memory and then runs the computer program to implement the project recommendation method provided in fig. 2.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile memory may include Read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, or the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration, and not limitation, RAM can be in various forms such as static random access memory (Static RandomAccess Memory, SRAM) or dynamic random access memory (Dynamic RandomAccess Memory, DRAM), etc.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the present invention.

Claims (8)

1. A method of recommending items, comprising:
Acquiring a historical interaction item sequence corresponding to an item of interaction of each user at a historical moment, determining original user embedding according to the historical interaction item sequence, and determining initial distribution representation of the original user embedding;
Gradually adding noise into the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, and inputting the Gaussian noise into a transducer model to obtain a first prediction embedding of the original user embedding; splicing the first prediction embedding and Gaussian noise, inputting a transducer model to obtain a second prediction embedding for the original user embedding, and training the transducer model by taking the deviation between the minimized second prediction embedding and the original user embedding as an optimization target to obtain a guiding diffusion model;
The method comprises the steps of inputting an initial distribution representation of original user embedding into a guide diffusion model to obtain reconstructed user embedding, determining the similarity between users according to the difference between the reconstructed user embedding, and determining the interaction existing between the users according to a preset similarity threshold value to construct a user interaction graph;
For each user, determining a neighbor user set of the user according to a user interaction diagram, and determining an enhancement sequence of the user according to a historical interaction item sequence of each neighbor user; and merging the enhanced sequence with the historical interaction project sequence of the user, and recommending the project to the user according to the merged sequence.
2. The method for recommending items according to claim 1, wherein said determining an original user insert from a historical interaction item sequence comprises:
determining the average value of the historical interaction item sequences of all users and embedding the average value as an original user by the following steps:
Where e u represents the original user embedding for user u, n represents the number of items in the user's historical interaction item sequence, and e k represents the sequence value of the items in the user u's historical interaction item sequence.
3. The item recommendation method as claimed in claim 1, wherein said adding noise in the original user embedding until the original user embedding is spread as gaussian noise, specifically comprises:
adding noise in the original user embedding until the original user embedding is spread as gaussian noise by:
xs←q(xs|x0,s);
Where x s represents noisy user embedding that has undergone s diffusion steps, x 0 represents an initial distribution representation of the original user embedding, s represents the diffusion step, and q () represents the approximate posterior distribution in the variance inference.
4. The method for recommending items according to claim 1, wherein the determining the similarity between the users according to the difference between the reconstructed user embedments to determine whether there is an interaction between the users according to a preset similarity threshold value comprises:
And determining the similarity between the users according to the difference between the reconstructed user embedments by the following steps:
determining whether interaction exists among the users according to a preset similarity threshold through the following formula:
Sim(ui,uj)≥τ;
Wherein Sim (u i,uj) represents the similarity between user u i and user u j, Representing a similarity measure function that is a function of the similarity measure,Representing the user embedding after user u i has been reconstructed,Representing the user embedding after the reconstruction of user u j, τ representing a preset similarity threshold.
5. The method for recommending items according to claim 1, wherein the determining, for each user, the enhancement sequence of the user according to the historical interaction item sequence of each neighboring user specifically comprises:
for each user, determining an enhancement sequence of the user according to the historical interaction item sequence of each neighbor user by the following formula:
Saug=Γ({Con({ua,ub})∪Con({ua,uc})∪Con({ub,uc})∪...}),
{ua,ub,uc,...}=N(ui);
Where N (u i) represents the neighbor set of user u i, con () represents the common items between the historic interaction item sequences of each pair of neighbor users, Γ () represents the ordering of the items in the set by item occurrence frequency, and S aug represents the enhancement sequence of user u i.
6. An item recommendation device, comprising:
The acquisition module is used for acquiring a historical interaction item sequence corresponding to the item with interaction of each user at the historical moment, determining the embedding of the original user according to the historical interaction item sequence, and determining the initial distribution representation of the embedding of the original user;
The training module is used for gradually adding noise into the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, inputting the Gaussian noise into a transducer model to obtain a first prediction embedding of the original user embedding;
The interaction graph construction module is used for inputting the initial distribution representation of the original user embedding into the guide diffusion model to obtain the reconstructed user embedding, determining the similarity between the users according to the difference between the reconstructed user embedding, and determining the interaction existing between the users according to a preset similarity threshold value to construct a user interaction graph;
and the recommendation module is used for determining a neighbor user set of each user according to the user interaction graph, determining an enhancement sequence of each user according to the historical interaction item sequence of each neighbor user, combining the enhancement sequence with the historical interaction item sequence of the user, and recommending the user according to the combined sequence.
7. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any one of claims 1-5.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the preceding claims 1 to 5 when executing the program.
CN202411192723.6A 2024-08-28 2024-08-28 Project recommendation method, device, medium and computer equipment Active CN119168793B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411192723.6A CN119168793B (en) 2024-08-28 2024-08-28 Project recommendation method, device, medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411192723.6A CN119168793B (en) 2024-08-28 2024-08-28 Project recommendation method, device, medium and computer equipment

Publications (2)

Publication Number Publication Date
CN119168793A CN119168793A (en) 2024-12-20
CN119168793B true CN119168793B (en) 2025-03-25

Family

ID=93877760

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411192723.6A Active CN119168793B (en) 2024-08-28 2024-08-28 Project recommendation method, device, medium and computer equipment

Country Status (1)

Country Link
CN (1) CN119168793B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119467A (en) * 2019-05-14 2019-08-13 苏州大学 A kind of dialogue-based item recommendation method, device, equipment and storage medium
CN117454000A (en) * 2023-10-27 2024-01-26 清华大学 Training method and device for sequence recommendation model based on diffusion model enhancement

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8463295B1 (en) * 2011-12-07 2013-06-11 Ebay Inc. Systems and methods for generating location-based group recommendations
US10810655B2 (en) * 2018-01-04 2020-10-20 Facebook, Inc. Generating catalog-item recommendations based on social graph data
CN116010684A (en) * 2021-10-20 2023-04-25 华为技术有限公司 Item recommendation method, device and storage medium
CN117992679B (en) * 2024-02-23 2024-07-05 宁夏大学 A project recommendation method, system and computer device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119467A (en) * 2019-05-14 2019-08-13 苏州大学 A kind of dialogue-based item recommendation method, device, equipment and storage medium
CN117454000A (en) * 2023-10-27 2024-01-26 清华大学 Training method and device for sequence recommendation model based on diffusion model enhancement

Also Published As

Publication number Publication date
CN119168793A (en) 2024-12-20

Similar Documents

Publication Publication Date Title
Zheng et al. Truncated diffusion probabilistic models
Sun et al. Consistent sparse deep learning: Theory and computation
Xu et al. Graphcar: Content-aware multimedia recommendation with graph autoencoder
Qu et al. Learning to selectively transfer: Reinforced transfer learning for deep text matching
CN112231582B (en) A website recommendation method and device based on variational autoencoding data fusion
CN117058276B (en) Image generation method, device, equipment and storage medium
CN109033107A (en) Image search method and device, computer equipment and storage medium
CN116975347B (en) Image generation model training method and related devices
Xu et al. On the necessity and effectiveness of learning the prior of variational auto-encoder
WO2024259886A9 (en) Image classification method and apparatus, device, storage medium, and program product
Zhao et al. Distributionally robust graph out-of-distribution recommendation via diffusion model
CN114399668A (en) Method and device for generating natural images based on hand-drawn sketches and image sample constraints
Blasingame et al. Adjointdeis: Efficient gradients for diffusion models
Kumar Diffusion Models and Generative Artificial Intelligence: Frameworks, Applications and Challenges
CN116561371B (en) A Multi-Label Video Classification Method Based on Multi-Instance Learning and Label Relationship Graph
CN119168793B (en) Project recommendation method, device, medium and computer equipment
CN119862424A (en) Multi-mode data processing method and device, model training method and device
Gao Game-theoretic approaches for generative modeling
Hao et al. Diff-GNDCRec: A diffusion model with graph-node enhancement and difference comparison for recommendation
CN118658032A (en) Video generation model training method, device, electronic device and storage medium
CN117909577A (en) A multi-behavior-aware image comparison recommendation method
CN116911958A (en) Recommendation system model training method and device, electronic equipment and storage medium
CN119204096B (en) Graph representation learning method based on sparse and remote neighbor node enhancement
CN118890502B (en) Video recommendation method, system, computer program product, device and storage medium
CN116911955B (en) Training method and device for target recommendation model

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant