A project recommendation method, device, medium and computer equipment

By guiding the diffusion model to reconstruct user embedding and construct user interaction graphs, the recommendation accuracy problems caused by data sparseness and noise interaction are solved, and more efficient user preference capture and project recommendation are achieved.

CN119168793BActive Publication Date: 2025-03-25NINGXIA UNIVERSITY
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202411192723.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2025-03-25
Estimated Expiration
2044-08-28

AI Technical Summary

Technical Problem

When existing sequence recommendation technologies deal with data sparsity, they are prone to deterioration in the quality of enhanced sequences due to noise interaction, which in turn affects the accuracy of project recommendations.

Method used

The guided diffusion model is adopted, and the reconstructed user embedding is obtained by adding noise to the user embedding until it diffuses to Gaussian noise and inputting it into the Transformer model for training. Based on these embeddings, the user interaction graph is built, the strong and weak interactions between users are dynamically inferred, and the data is enhanced using the public items of neighbor users, and finally project recommendation is carried out.

Benefits of technology

It effectively avoids the introduction of noise projects, improves the accuracy of user recommendations, and can more accurately capture users' multiple preferences and make project recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119168793B_ABST
    Figure CN119168793B_ABST
Patent Text Reader

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 enhanced sequence of the user 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of project recommendation, and in particular to a project recommendation method, device, medium and computer equipment. Background Art

[0002] In general, the background of sequence recommendation technology is closely related to the development of personalized recommendation systems. With the popularization of the Internet and the accumulation of massive user data, people have gradually realized that traditional content-based or collaborative filtering recommendation systems have some limitations, such as the inability to accurately capture the user's time series behavior and evolution process. As a result, sequence recommendation technology came into being, aiming to use the time series information of user behavior, combined with sequence models, reinforcement learning, recursive neural networks and other technologies to model the user's historical behavior and current behavior, so as to more accurately predict the user's future preferences and behaviors. The development of this technical background enables the recommendation system to adapt to the personalized needs of users more accurately, and has been widely used in e-commerce, social media, audio and video services and other fields.

[0003] In the prior art, sequence recommendation aims to predict the user's next item from the user's historical item sequence, so as to understand the user's interest evolution process. It has been widely used in various online platforms, such as streaming, e-commerce, social networks, etc. Traditional sequence recommendation (SR) methods mainly use Markov chains to learn temporal interaction migration, such as MC-RGN, SPMC, etc. Recent research has focused on deep sequence recommendation models and achieved satisfactory results. However, in real scenarios, most users only interact with a limited number of items, which leads to data sparsity problems and hinders the development of sequence recommendation.

[0004] When dealing with data sparsity, data augmentation is an intuitive approach because it can enrich the interaction items of each user. Therefore, some sequence-level data augmentation models have emerged, which generate new sequences or users to address the problem of data sparsity. For example, CASR generates high-quality user behavior sequences, which are trained based on the original sequences and the generated user behavior sequences respectively. L2Aug uses reinforcement learning to iteratively train based on the sequence recommendation model and the sequence generator. Recently, Chen et al. used random or frequency-based methods to generate new user behavior sequences, which are still trained based on the original sequences and the new sequences.

[0005] However, due to the noisy interactions in the original user-user interactions, noisy items will be generated in the enhanced sequence, which seriously affects the quality of the user enhanced interaction sequence and makes the item recommendation accuracy worse. Summary of the invention

[0006] Based on this, it is necessary to provide a project recommendation method, device, medium and computer equipment to address the above technical issues.

[0007] The present invention adopts the following technical solutions:

[0008] The present invention provides a project recommendation method, comprising:

[0009] Obtain the historical interaction item sequence corresponding to the items that each user interacted with at the historical moment, determine the original user embedding according to the historical interaction item sequence, and determine the initial distribution representation of the original user embedding;

[0010] By gradually adding noise to the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, the Gaussian noise is input into the Transformer model to obtain a first predicted embedding of the original user embedding; the first predicted embedding and the Gaussian noise are concatenated and input into the Transformer model to obtain a second predicted embedding of the original user embedding, and the Transformer model is trained with minimizing the deviation between the second predicted embedding and the original user embedding as the optimization goal to obtain a guided diffusion model;

[0011] The initial distribution representation of the original user embedding is input into the guided diffusion model to obtain the reconstructed user embedding; and the similarity between the users is determined based on the gap between the reconstructed user embeddings, so as to determine the interaction between the users based on the preset similarity threshold to construct a user interaction graph;

[0012] For each user, the set of neighbor users of the user is determined according to the user interaction graph, and the enhanced sequence of the user is determined according to the historical interaction item sequence of each neighbor user; the enhanced sequence is merged with the historical interaction item sequence of the user, and items are recommended to the user according to the merged sequence.

[0013] Optionally, determining the original user embedding according to the historical interaction item sequence specifically includes:

[0014] The mean of each user’s historical interaction item sequence is determined by the following formula and embedded as the original user:

[0015]

[0016] Among them, e u represents the original user embedding of user u, the number of items in the user's historical interaction item sequence, e k Represents the sequence value of an item in the historical interaction item sequence of user u.

[0017] Optionally, adding noise to the original user embedding until the original user embedding is diffused into Gaussian noise specifically includes:

[0018] Noise is added to the original user embedding until the original user embedding is diffused into Gaussian noise by the following formula:

[0019] x s ←q(x s |x 0 ,s);

[0020] Among them, x s represents the noisy user embedding after s diffusion steps, x 0 represents the initial distribution representation of the original user embedding, s represents the diffusion step, and q() represents the approximate posterior distribution in variational inference.

[0021] Optionally, determining the similarity between users according to the gap between the reconstructed user embeddings, so as to determine whether there is interaction between the users according to a preset similarity threshold, specifically includes:

[0022] The similarity between users is determined based on the gap between the reconstructed user embeddings using the following formula:

[0023]

[0024] The following formula is used to determine whether there is interaction between users according to the preset similarity threshold:

[0025] Sim(u i ,u j ) ≥ τ;

[0026] Among them, Sim(u i ,u j ) represents user u i and user u j The similarity between represents the similarity measurement function, Represents user u i Reconstructed user embedding, Represents user u j Reconstructed user embedding, τ represents the preset similarity threshold.

[0027] Optionally, for each user, determining the enhancement sequence of the user according to the historical interaction item sequences of each neighbor user specifically includes:

[0028] For each user, the enhanced sequence of the user is determined according to the historical interaction item sequences of each neighbor user by the following formula:

[0029] S aug=Γ({Con({u a ,u b})∪Con({u a ,u c})∪Con({u b ,u c})∪...}),

[0030] {u a ,u b ,u c ,...}=N(u i );

[0031] Among them, N(u i ) represents user u i The neighbor set of S is , Con() represents the common items between the historical interaction item sequences of each pair of neighbor users, Γ( ) represents the sorting of items in the set by the frequency of occurrence of the items, S aug Represents user u i enhancement sequence.

[0032] The present invention provides a project recommendation device, comprising:

[0033] An acquisition module is used to acquire a historical interaction item sequence corresponding to items that each user interacted with at a historical moment, determine the original user embedding according to the historical interaction item sequence, and determine an initial distribution representation of the original user embedding;

[0034] A training module is used to gradually add noise to the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, input the Gaussian noise into the Transformer model, and obtain a first predicted embedding of the original user embedding; concatenate the first predicted embedding and the Gaussian noise and input them into the Transformer model to obtain a second predicted embedding of the original user embedding, and train the Transformer model with minimizing the deviation between the second predicted embedding and the original user embedding as the optimization goal to obtain a guided diffusion model;

[0035] The interaction graph construction module is used to input the initial distribution representation of the original user embedding into the guided diffusion model to obtain the reconstructed user embedding; and determine the similarity between the users according to the gap between the reconstructed user embeddings, so as to determine the interaction between the users according to the preset similarity threshold to construct the user interaction graph;

[0036] The recommendation module is used to determine the set of neighbor users of each user according to the user interaction graph, and determine the enhanced sequence of the user according to the historical interaction item sequence of each neighbor user; merge the enhanced sequence with the historical interaction item sequence of the user, and recommend items to the user according to the merged sequence.

[0037] The present invention provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned project recommendation method is implemented.

[0038] The present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the above-mentioned project recommendation method is implemented when the processor executes the program.

[0039] At least one of the above technical solutions adopted by the present invention can achieve the following beneficial effects:

[0040] The present invention first obtains the historical interaction item sequence of each user at a historical moment, and determines the corresponding original user embedding, thereby inferring the interaction strength between users based on the application of the diffusion model, reconstructing the user embedding, and constructing a user interaction graph based on the reconstructed user embedding, thereby determining the enhanced sequence of each user based on the historical interaction item sequence of its neighbor users and recommending items to the user based on the user interaction graph. By inferring the interaction strength between users, the present invention avoids the introduction of noise items in the enhanced sequence caused by the noise caused by the original user interaction, thereby improving the accuracy of recommendation for users. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0042] Figure 1 A schematic diagram of converting an original sequence to an augmented sequence provided by the present invention;

[0043] Figure 2 A schematic diagram of a project recommendation method provided by the present invention;

[0044] Figure 3 A schematic diagram of the overall architecture of GDiffuASR provided by the present invention;

[0045] Figure 4 A GDiffuHI data flow diagram provided by the present invention;

[0046] Figure 5 A schematic diagram of data augmentation provided by the present invention;

[0047] Figure 6 A schematic diagram of a project recommendation device provided by the present invention;

[0048] Figure 7A schematic diagram of a computer device for implementing a project recommendation method provided by the present invention. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0050] In general, sequential recommendation aims to infer the user's next item based on the user's historical interaction items, which have attracted widespread attention due to their important commercial value. However, in practical scenarios, sequential recommendation often encounters the problem of data sparsity.

[0051] When dealing with data sparsity, data augmentation is an intuitive approach because it can enrich the interaction items of each user. Therefore, some sequence-level data augmentation models have emerged, which generate new sequences or users to solve the problem of data sparsity. For example, CASR generates high-quality user behavior sequences, which are trained based on the original sequences and the generated user behavior sequences respectively. L2Aug uses reinforcement learning to iteratively train based on the sequence recommendation model and the sequence generator. Recently, Chen et al. used random or frequency-based methods to generate new user behavior sequences, which are still trained based on the original sequences and the new sequences. However, compared with directly training the model based on the augmented dataset, the sequence-level data augmentation model needs to train the original sequence and the new sequence separately, so the training process is more complicated, so the sequence-level model is not very convenient. To solve this problem, some item-level data augmentation models have emerged, which generate new items for each user's interaction sequence and train the sequence recommendation model directly on the augmented dataset. For example, BARec adopts knowledge augmentation and bidirectional temporal augmentation strategies to generate pseudo-prior items, which can learn item semantic relevance and capture user preferences. ASReP generates virtual items by pre-training transformers and uses these augmented sequences to infer the next item. Recently, SparseEnNet generates robust augmented items in latent space through adversarial generative models for sequence recommendation. However, most existing methods represent augmented items with fixed vectors, which have limited ability to capture users' various preferences and may cause distribution drift of the original item sequence.

[0052] Figure 1 It is a schematic diagram of the original sequence to the augmented sequence in the present invention, Figure 1It is revealed that the noisy original user-user interaction graph may seriously affect the quality of user-enhanced interaction sequences. Specifically, Figure 1 The circles in the figure represent users, and the hexagons represent items. The lines between users represent existing user interactions, while the orange dashed lines represent noise interactions. The two pieces of content separated by the rectangles, 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 are pairwise interactions between the three users, where u i and u k is a noisy interaction. The graph homogeneity hypothesis suggests that interconnected users should generally have more similar interests and preferences. Therefore, users may prefer items with user interactions as the enhancement items of each user interaction sequence, such as Figure 1 As shown on the right. Therefore, due to the noisy interactions in the original user-user interactions, noisy items (orange hexagons) are generated in the enhanced sequence, which seriously affects the quality of the user's enhanced interaction sequence and may deteriorate the recommendation performance. Fortunately, even if there are a small number of noisy items in the original interaction sequence, the user's original interaction sequence still reflects the user's preferences to a large extent. Therefore, the strong and weak interactions between users can be inferred by learning user preferences from the original interaction sequence to mitigate noisy interactions in data enhancement, rather than using the original user-user interactions that always have noise. However, existing work has not considered directly using the user's original interaction sequence to infer interactions between users for data enhancement, which may lead to the introduction of more noisy items in the enhanced sequence and thus reduce the recommendation performance.

[0053] Sequential recommendation models model the sequential dependencies of user historical behaviors to capture the user's dynamic preferences for the next recommended items that may be of interest. Traditional methods mainly use Markov chains to learn temporal interaction transformations. For example, SPMC (Socially Aware Personalized Markov Chain) introduces a personalized Markov chain that combines sequential and social information for sparse sequential recommendation, while MC-RGN integrates time series networks and Markov chains for sequential recommendation. Recent studies focus on deep sequential recommendation models as they show promising results. TiDA-GCN proposes an enhanced domain-aware graph convolutional network for cross-domain sequential recommendation, while Li et al. learn static feature embeddings of nodes through double contrastive learning for sequential recommendation. Recently, researchers have begun to focus on self-attention mechanisms for sequential recommendation due to their powerful ability to model sequences. For example, SASRec introduces a self-attention-based sequential model to capture long-term semantics, while BERT4Rec adopts bidirectional self-attention to learn user behavior sequences for sequential recommendation. Recently, TGT uses self-attention mechanisms to capture dynamic user-item interactions for multiple behaviors for sequential recommendation. ADT uses a self-attention mechanism to propose an adaptive decoupled transformer architecture for sequence recommendation. Although sequence recommendation models have made considerable progress, the data sparsity problem limits further improvements.

[0054] Currently, there are many methods for item sequence recommendation, such as:

[0055] A continuous time series recommendation method based on time graph collaborative conversion, publication number (CN118052611A), the specific steps include: 1 : Collect the data sets of user information, project information and time information to build a bipartite graph of user behavior, and divide the data set into a training set and a validation set; S 2 : Based on the time information, a time series effect model is constructed to calculate the correlation between two times; S 3 : Build the information processing layer, generate the collaborative signal model, take user information, project information and time information as input, and generate user query information and project query information; S 4 : Construct a temporal collaborative attention model to generate weight coefficients by calculating the correlation between historical interaction items and current user query information; S 5 : Integrate weight coefficients and user query information in a linear manner to generate historical time series information; S 6 : The user query information and project query information are integrated with the historical time series information through the feedforward neural network to generate the final user time series information and project time series information respectively; S 7 : Generate recommendation coefficients based on user timing information and item timing information, and optimize them using the BPR loss function.

[0056] A self-attention sequence recommendation algorithm based on movie type time interval, publication number (CN117807305A), characterized by comprising the following steps: S 1 , prepare the data set, preprocess the files in the data set, and generate the data format that the algorithm can use; S 2 , intercept the user-movie interaction sequence and the corresponding time series in the dataset; S 3 , calculate the same type of time interval matrix based on the timestamps of the user-movie interaction sequences in the dataset; S 4 , use the multi-head self-attention mechanism to train the user-movie interaction sequence, the absolute position information of the movie, and the type time interval matrix to obtain the prediction model; S 5 , use convolutional neural networks to improve the model’s fit, and then predict the next movie.

[0057] A sequence recommendation algorithm based on deep reinforcement learning that takes into account user future preferences, publication number (CN115600009A), specifically includes the following steps: S 1 :According to the interactive item set X of user u U , generate the user's general preference (historical preference), where the interactive item set X u Refers to the first n items that the user has interacted with; S 2 :According to the interactive item set X of user u U , the relative future interaction sequence of the user's neighbors is obtained through the neighbor sequence extraction module, and the same S 1 The same method is used to obtain the user's future preferences; S 3 :S 1 and S 2 The user’s general preferences (historical preferences) and the user’s future preferences are merged into the user’s comprehensive preferences through the attention network and used as the state S in deep reinforcement learning. t ; S 4 : Construct a Markov decision process and establish a Q network; S 5 :Build a recommendation model based on Double-DQN and train it, and alternately update the recommendation model of Double-DQN. According to claim 1, a sequential recommendation algorithm based on deep reinforcement learning that takes into account the user's future preferences is characterized in that, in step 1, the set of users is U = {u 1 ,u 2 ,.......u |U|}, the set of commodities is V = {v 1 ,v 2 ,.......v |V|}, the order of user interaction items is sorted by time as follows: The items that a user interacts with at time step t are denoted as We first calculate user embeddings from user historical behaviors. In order to capture dynamic interaction sequences, we will introduce recurrent neural networks (RNNs) to calculate variable-length user embeddings. We use long short-term memory (LSTM) as the basic unit of RNNs to capture temporal dynamics. Each LSTM unit includes a memory cell c at time t. t , output gate i t , forget gate f t , output gate o t , these gates are based on the previous hidden state h t-1 and the current input x t Calculated, [f t ,i t ,o t ]=sigmoid(W[h t-1 ,x t ]), memory cells c t Updated some of the forgotten memories and added new memories: I t :I t =tanh(V[h t-1 ,x t ])c t =f t ⊙c t-1 +i t I t Once the memory content is updated, the hidden state will also be updated h t =o t ⊙tanh(c t ) The obtained user u feature information is fused using the attention network to obtain S 1 The general preference (historical preference) P of user u described in history .

[0058] A method for removing image highlights based on a patch denoising diffusion model, publication number (CN118096583A), comprises the following steps: step 1, building a basic diffusion model based on the U-Net architecture, using the existing publicly available highlight data set as a data set, performing forward diffusion denoising on the image containing no highlights, updating the corresponding diffusion model parameters, and storing the corresponding parameters in the diffusion model based on the U-Net architecture; step 2, defining its real-life highlight-free image of any size as X 0 , define the image containing highlights Defined as a binary mask matrix of the same dimension as and , represents the location of the i-th P×P patch; Step 3, randomly select a binary patch mask P i ; According to the patch mask, the non-highlight image X0 and images with highlights Cut and get and Represents an image pair from the training set P×P patch; Step 4, randomly select a time step t from the uniform distribution and randomly select a noise ∈ t from the standard normal distribution; Step 5, perform a gradient descent step to update the relevant parameters θ by minimizing the difference between the noise predicted by the diffusion model based on the U-Net architecture and the actual noise; Step 6, continue to iterate the above steps 2 to 5 until convergence is reached. Finally, θ is returned as the model parameter after training, and the trained conditional model ∈ θ is obtained. Step 7: Remove the image that needs highlights The noise processing is performed to obtain a pure noise image of the same size. The two constitute the basic input data of the restoration process. Next, the conditional model ∈θ trained in step 6 is used Perform implicit sampling iterations to gradually restore the noisy image. After the iterations are completed, return a clear image with highlights removed after restoration.

[0059] A personal image recommendation method based on facial recognition and data processing, publication number (CN116127114A), characterized in that the method comprises the following steps: S 11 : Obtain a face picture with makeup and construct a dataset of the face with makeup; S 12 : According to the dataset of the face with makeup, a facial feature mask of the face with makeup is obtained; S 13 : According to the dataset of the face with makeup and the facial features mask of the face with makeup, the features of the face with makeup are obtained through the trained autoencoder; S 14 : Based on the user's face photo, obtain the user's face facial features mask; S 15 : Based on the user's face photo and the user's face facial mask, the user's face features are obtained through the trained autoencoder; S 16 : Construct a graph structure based on the makeup-wearing face features and the user face features; S 17 :Use the user's facial features to initialize the cluster list, select the makeup-wearing facial feature with the largest gain degree with the user's facial feature module according to the graph structure, and add it to the cluster list, wherein each makeup-wearing facial feature in the cluster list corresponds to a makeup recommended to the user; S 18 : All nodes in the cluster list are formed into a new supernode, and the module gain between the supernode and the remaining nodes is calculated, wherein the remaining nodes are nodes that do not form the supernode; S 19: Among the remaining nodes, add the node with the largest module gain with the super node to the cluster list; repeat step S 18 and S 19 Until the number of nodes in the cluster list reaches the threshold α. 110 : If the number of nodes in the cluster list reaches the threshold α, the makeup corresponding to the facial features with makeup stored in the nodes in the cluster list is recommended to the user in sequence. If the user is not satisfied with the makeup, the next makeup corresponding to the facial features with makeup stored in the nodes in the cluster list is recommended. If the user selects a certain makeup, the recommendation is exited. If the user does not select any makeup in the cluster list, it returns to step S. 18 ; S 111 : If the number of nodes in the cluster list does not reach the threshold α, return to step S 18 .

[0060] A service recommendation method, publication number (CN115878892A), comprising: 1. acquiring attribute information of an object to be recommended; 2. determining at least one service to be recommended corresponding to the object to be recommended based on the attribute information; 3. recommending the at least one service to be recommended to the sequence of objects to be recommended; 4. in response to a confirmation result of the object to be recommended for a target service in real time feedback, configuring the target service to 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.

[0061] In order to solve the above problems, the present invention proposes a guided diffusion enhancement strategy to solve the data sparsity problem of sequential recommendation (GDiffuASR). Specifically, GDiffuASR first establishes a guided diffusion model with user historical interaction items to guide user embedding reconstruction, which can effectively capture the user's current multiple preferences. In more detail, GDiffuHI destroys the user embedding obtained by calculating the average value of the user's original interaction sequence into a Gaussian distribution by adding noise in the diffusion stage. The noisy user embedding is fed into an approximator based on user historical interaction items to guide user embedding reconstruction for model training. The noisy user embedding can ensure that the generated data is always beneficial to the diffusion enhancement model. The user distribution representation can be obtained by iteratively inverting pure Gaussian noise using a well-trained approximator. The reconstructed user embedding is then used to dynamically infer strong and weak interactions between users to construct a user-user graph. In more detail, the user embedding vector reconstructed by a similarity metric function (such as cosine similarity, Manhattan distance, etc.) is used to calculate the similarity value between users. The larger the similarity value, the greater the possibility of interaction between users, and vice versa. By setting different similarity thresholds to dynamically infer the strong and weak interactions between users, a user-user graph is constructed, and the similarity threshold is adjusted to automatically adapt to the datasets of different recommendation domains. Next, the common items of user neighbors are used as user enhancement items, and data enhancement is performed based on the constructed user-user graph, which can effectively capture the high-order relationship between users and items. Finally, the enhanced dataset fine-tunes the parameters of the previously constructed diffusion model for sequential recommendation without the need for a complex training process.

[0062] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0063] Figure 2 This is a schematic diagram of a project recommendation method in the present invention, which specifically includes the following steps:

[0064] S101: Obtain a historical interaction item sequence corresponding to items that each user interacted with 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.

[0065] S102: adding noise to the original user embedding until the original user embedding is diffused into Gaussian noise, inputting the Gaussian noise into the Transformer model to obtain a predicted embedding for the original user embedding, and training the Transformer model with minimizing the deviation between the predicted embedding and the original user embedding as the optimization goal to obtain a guided diffusion model.

[0066] Generally, when recommending items to users, the user's preferences can be inferred based on the user's historical interaction items and interactions between users to obtain items that the user may be interested in and thus make item recommendations.

[0067] Based on this, in one or more embodiments of the present invention, the server of the business platform may first obtain a historical interaction item sequence corresponding to items with which each user interacted at a historical moment.

[0068] For example, the user set U = {u 1 ,u 2 ,...,u |U|} and the set of items I = {i 1 ,i 2 ,...,i |I|}, the historical interaction item sequence of user u can be defined as Where n is the number of items in the user's historical interaction item sequence. Based on the user's historical interaction item sequence, the user's multiple preferences can be learned.

[0069] This paper first constructs a guided diffusion model with user history interaction terms (GDiffuHI) to guide the reconstruction of user embeddings, so that it can effectively capture the user's current multiple preferences, such as Figure 4 As shown, Figure 4 Schematic diagram of a GDiffuHI data flow in the present invention. GDiffuHI includes three parts: 1) an approximator f for user embedding reconstruction θ (); 2) a diffusion (training) phase for incorporating guidance from user embeddings and injecting noise for robust approximator learning; 3) a reverse process for user embedding learning.

[0070] (1) Approximator: Benefiting from the powerful sequential dependency modeling capability of Transformer, Transformer can be used as an approximator. θ (), used to generate user embedding reconstruction As shown below:

[0071]

[0072] Among them, [z 1 ,...,z j ,...,z n ] defines the user's historical interaction sequence S raw ={i 1 ,i 2 ,...,i n}, and z j Defines project i j The representation of can be obtained by the following formula:

[0073] z j =e j +η i ⊙x s

[0074] Among them, e j Defines the term used to represent item i j The static item embeddings of the inherent latent features, η i is sampled from a Gaussian distribution, and ⊙ denotes the element-wise product. During the diffusion process, x s is the noisy user embedding that has undergone s diffusion steps. In the reverse phase, x s is the inverted user embedding. In this way, the noisy user embedding x s Adjusted the user history interaction item S raw This ensures that the generated data is always beneficial to the diffusion enhancement model through the guidance of the user embedding, because x s is used as an auxiliary semantic signal.

[0075] (2) Diffusion (training) process: Perform reverse operation, starting from the user's historical interaction item sequence S raw Restore user embed x 0 Therefore, in the diffusion stage, by embedding e u Adding noise, we corrupt it into a Gaussian distribution as shown below:

[0076]

[0077] Among them, x 0 Defines the original user embedding e sampled from q() u The initial distribution of s defines the diffusion step. The original interaction sequence S of the user can be calculated raw The original user embedding e is obtained by taking the mean of u , as shown below.

[0078]

[0079] x can be obtained according to the specific diffusion settings s , which can reflect the user's various preferences. s To adjust the representation And train the approximator f with the cross entropy loss θ ( ), which strengthens the original user embedding u Close to the user embedding reconstructed from the approximator

[0080] (3) Reverse process: In the reverse process, the goal is to transform pure Gaussian noise xt Iteratively recover the user embedding x 0 , where t defines the number of diffusion steps. Also use x t To adjust the representation and feed it into a well-trained approximator f θ () to estimate As shown below:

[0081]

[0082] Then, using pure Gaussian noise x t And estimate To invert x from p() t-1 , and repeat this process recursively until x is obtained 0 , as shown below.

[0083]

[0084] The server mentioned in the present invention may be a server set on a business platform, or a device such as a desktop computer, a notebook computer, etc. that can execute the solution of the present invention. For the convenience of description, the following description is only based on the server as the execution subject.

[0085] S103: Input the initial distribution representation of the original user embedding into the guided diffusion model to obtain the reconstructed user embedding; and determine the similarity between the users based on the gap between the reconstructed user embeddings, so as to determine whether there is interaction between the users based on a preset similarity threshold, and construct a user interaction graph.

[0086] S104: For each user, determine the set of neighbor users of the user according to the user interaction graph, and determine the enhanced sequence of the user according to the historical interaction item sequence of each neighbor user; merge the enhanced sequence with the historical interaction item sequence of the user, and recommend items to the user according to the merged sequence.

[0087] After obtaining the guided diffusion model as described above, the server can reconstruct the user embedding and use the reconstructed user embedding to build a user-user graph, then generate an enhanced new sequence based on the constructed user-user graph, and finally use the new sequence to fine-tune the parameters of the previously built GDiffuHI model for sequence recommendation.

[0088] (1) User interaction graph construction. There is always noise in the current user interaction graph. The present invention can use the reconstructed user embedding to infer the strong and weak interactions between users, instead of using the original user interaction graph to reconstruct the user-user graph G(U,E), thereby avoiding the noise problem caused by the original user interaction graph. Here, U defines a set of users U = {u 1 ,u 2,...,u |U|}, and E∈U×U defines the set of interactions (edges) between users. In particular, the reconstructed user embedding vector and Calculate user u i and u j The similarity value Sim(u i ,u j ). If Sim(u i ,u j )≥τ, then user u i and u j There is an edge between them and vice versa, as shown in the following equation:

[0089]

[0090] here, Defines user u i and u j Similarity measurement functions between, such as cosine similarity, Manhattan distance, etc. and The user u is defined separately i and u j The reconstructed user embedding of , which can be obtained through the GDiffuHI model. The similarity value Sim(u i ,u j ) is larger, the user u i and u j The stronger the similarity threshold τ, the greater the possibility of interaction between users, and vice versa. By setting various similarity thresholds τ, we can dynamically infer the strong and weak interactions between users for user interaction graph construction. Setting a larger similarity threshold τ can infer stronger interactions between users, and vice versa. In addition, the similarity threshold can be adjusted to automatically adapt to datasets of different sparsity in different recommendation fields to achieve effective data augmentation.

[0091] Based on the constructed user interaction graph G(U,E), the common items of user neighbors can be used as user-enhanced items for data enhancement, such as Figure 5 As shown, Figure 5 Schematic diagram of data augmentation in the present invention. Specifically, the target user u can be obtained from the user-user graph G(U,E) according to the following formula: i The set of all neighbor users of:

[0092] C={u a ,u b ,u c ,...}=N(u i )

[0093] Among them, N(u i) is defined as the set of all neighbor users C = {u a ,u b ,u c ,...}. Then, the common items between each pair of neighbor users are returned as the target items for user enhancement for data enhancement, as shown in the following formula:

[0094] S aug =Γ({Con({u a ,u b})∪Con({u a ,u c})∪Con({u b ,u c})∪...})

[0095] Here, Con() defines the common items between users. The Γ function is used to sort the items by their frequency of occurrence, and the items with lower frequency of occurrence can be truncated, which can ensure the enhancement of the sequence S aug It has a close relationship with the target user and removes noise items. Finally, the enhanced sequence S aug Insert the original sequence S raw In the example above, a new sequence S is generated for sequence recommendation. new .

[0096] Finally, the GDiffuHI model parameters constructed previously can be used for sequence recommendation, eliminating the complicated training process. Specifically, the approximation function f θ () to reconstruct the target project e n+1 The embedding of is defined as the new sequence S using the enhancement new Generated This can be done as follows:

[0097]

[0098] Among them, [z -M ,...,z -1 ] defines the user enhancement interaction sequence S aug ={i -M ,...,i -1 The distribution representation of} can be obtained based on the above. In the diffusion stage, the target item can be embedded into e by adding noise. n+1 Corrupted into a Gaussian distribution and incorporated with the guidance of the target item embedding for approximator learning, which strengthens the target item embedding e n+1 Projects close to refactoring The reverse process is used for target item prediction. Specifically, the recovered target item can be embedded into y 0 Mapping to a discrete item index space for recommendation.

[0099] based on Figure 2 The project recommendation method shown 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 the diffusion model, reconstructing the user embedding, and constructing a user interaction graph based on the reconstructed user embedding, thereby determining the enhanced sequence of each user based on the historical interaction project sequence of its neighbor users and recommending projects to the user based on the enhanced sequence. The present invention infers the strength of interaction between users and avoids the introduction of noise projects in the enhanced sequence caused by the noise caused by the original user interaction, thereby improving the accuracy of recommendation for users.

[0100] Specifically, we first introduce the diffusion-based GDiffuHI to guide the reconstruction of user embeddings, effectively capture the user's current multiple preferences, and ensure that the generated data can always bring benefits to the diffusion enhancement model. Then, we use the reconstructed user embeddings to dynamically infer the strong and weak interactions between users, construct a user-user graph, and automatically adapt to data sets of different recommendation domains by adjusting the similarity threshold. In addition, the present invention uses the common items of user neighbors as user enhancement items, which can effectively capture the high-order relationship between users and items.

[0101] When applying the project recommendation method provided by the present invention, it is not necessary to Figure 2 The steps are executed in the order shown. The specific execution order of the steps can be determined according to needs, and the present invention does not limit this.

[0102] The above is a project recommendation method provided by one or more embodiments of the present invention. Based on the same idea, the present invention also provides a corresponding project recommendation device, such as Figure 6 shown.

[0103] Figure 6 A schematic diagram of a project recommendation device provided by the present invention includes:

[0104] An acquisition module 201 is used to acquire a historical interaction item sequence corresponding to items that each user interacted with 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;

[0105] The training module 202 is used to gradually add noise to the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, input the Gaussian noise into the Transformer model, and obtain a first predicted embedding of the original user embedding; concatenate the first predicted embedding and the Gaussian noise and input them into the Transformer model to obtain a second predicted embedding of the original user embedding, and train the Transformer model with minimizing the deviation between the second predicted embedding and the original user embedding as the optimization goal to obtain a guided diffusion model;

[0106] The interaction graph construction module 203 is used to input the initial distribution representation of the original user embedding into the guided diffusion model to obtain the reconstructed user embedding; and determine the similarity between the users according to the gap between the reconstructed user embeddings, so as to determine the interaction between the users according to a preset similarity threshold to construct a user interaction graph;

[0107] The recommendation module 204 is used to determine, for each user, a set of neighbor users of the user according to the user interaction graph, and determine an enhanced sequence of the user according to the historical interaction item sequence of each neighbor user; merge the enhanced sequence with the historical interaction item sequence of the user, and recommend items to the user according to the merged sequence.

[0108] For the specific definition of the project recommendation device, please refer to the definition of the project recommendation method above, which will not be repeated here. Each module in the above project recommendation device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0109] The present invention also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 2 Provides project recommendation methods.

[0110] The present invention also provides Figure 7 The structural diagram of the computer device shown in FIG. Figure 7 As shown in the figure, at the hardware level, the computer device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 2 Provides project recommendation methods.

[0111] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0112] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of the present invention.

Claims

1. A project recommendation method, characterized in that: include: Obtain the historical interaction item sequence corresponding to the items that each user interacted with at the historical moment, determine the original user embedding according to the historical interaction item sequence, and determine the initial distribution representation of the original user embedding; By gradually adding noise to the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, the Gaussian noise is input into the Transformer model to obtain a first predicted embedding of the original user embedding; the first predicted embedding and the Gaussian noise are concatenated and input into the Transformer model to obtain a second predicted embedding of the original user embedding, and the Transformer model is trained with minimizing the deviation between the second predicted embedding and the original user embedding as the optimization goal to obtain a guided diffusion model; The initial distribution representation of the original user embedding is input into the guided diffusion model to obtain the reconstructed user embedding; and the similarity between the users is determined based on the gap between the reconstructed user embeddings, so as to determine the interaction between the users based on the preset similarity threshold to construct a user interaction graph; For each user, determine the set of neighbor users of the user according to the user interaction graph, and determine the enhancement sequence of the user according to the historical interaction item sequence of each neighbor user; The enhanced sequence is merged with the historical interaction item sequence of the user, and items are recommended to the user according to the merged sequence.

2. The project recommendation method according to claim 1, characterized in that: Determining the original user embedding according to the historical interaction item sequence specifically includes: The mean of each user’s historical interaction item sequence is determined by the following formula and embedded as the original user: Among them, e u represents the original user embedding of user u, n represents the number of items in the user's historical interaction item sequence, and e k Represents the sequence value of an item in the historical interaction item sequence of user u.

3. The project recommendation method according to claim 1, characterized in that: The adding noise to the original user embedding until the original user embedding is diffused into Gaussian noise specifically includes: Noise is added to the original user embedding until the original user embedding is diffused into Gaussian noise by the following formula: x s ←q(x s |x0,s); Among them, x s represents the noisy user embedding that has undergone s diffusion steps, x0 represents the initial distribution representation of the original user embedding, s represents the diffusion step, and q( ) represents the approximate posterior distribution in variational inference.

4. The project recommendation method according to claim 1, characterized in that: The determining of the similarity between the users according to the gap between the reconstructed user embeddings, so as to determine whether there is interaction between the users according to a preset similarity threshold, specifically includes: The similarity between users is determined based on the gap between the reconstructed user embeddings using the following formula: The following formula is used to determine whether there is interaction between users according to the preset similarity threshold: Yes(u i ,u j )≥τ; Among them, Sim(u i ,u j ) represents user u i and user u j The similarity between represents the similarity measurement function, Represents user u i Reconstructed user embedding, Represents user u j Reconstructed user embedding, τ represents the preset similarity threshold.

5. The project recommendation method according to claim 1, characterized in that: The step of determining, for each user, the enhanced sequence of the user according to the historical interaction item sequences of each neighbor user specifically includes: For each user, the enhanced sequence of the user is determined according to the historical interaction item sequences of each neighbor user by the following formula: S aug =Γ({Con({u a ,u b })∪Con({u a ,u c })∪Con({u b ,u c })∪...}), {u a ,u b ,u c ,...}=N(u i ); Among them, N(u i ) represents user u i The neighbor set of , Con( ) represents the common items between the historical interaction item sequences of each pair of neighbor users, Γ( ) represents the sorting of items in the set by the frequency of item occurrence, S aug Represents user u i enhancement sequence.

6. A project recommendation device, characterized in that: include: An acquisition module is used to acquire a historical interaction item sequence corresponding to items that each user interacted with at a historical moment, determine the original user embedding according to the historical interaction item sequence, and determine an initial distribution representation of the original user embedding; A training module is used to gradually add noise to the initial distribution representation of the original user embedding until the original user embedding is diffused into Gaussian noise, input the Gaussian noise into the Transformer model, and obtain a first predicted embedding of the original user embedding; concatenate the first predicted embedding and the Gaussian noise and input them into the Transformer model to obtain a second predicted embedding of the original user embedding, and train the Transformer model with minimizing the deviation between the second predicted embedding and the original user embedding as the optimization goal to obtain a guided diffusion model; The interaction graph construction module is used to input the initial distribution representation of the original user embedding into the guided diffusion model to obtain the reconstructed user embedding; and determine the similarity between the users according to the gap between the reconstructed user embeddings, so as to determine the interaction between the users according to the preset similarity threshold to construct the user interaction graph; A recommendation module, for each user, determining a set of neighbor users of the user according to the user interaction graph, and determining an enhanced sequence of the user according to a sequence of historical interaction items of each neighbor user; The enhanced sequence is merged with the historical interaction item sequence of the user, and items are recommended to the user according to the merged sequence.

7. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

8. A computer device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Recommendation method based on deep reinforcement learning and considering future preference of user

    CN115600009A

  • Service recommendation method and device

    CN115878892A

  • Personal image recommendation method and system based on facial recognition and data processing

    CN116127114A

  • Self-attention sequence recommendation algorithm based on movie type time interval

    CN117807305A

  • Continuous time sequence recommendation method based on time chart collaborative conversion

    CN118052611A