Cross-domain sequential recommendation method and system based on sequence-aware item feature alignment
By constructing a directed item association graph and using a feature optimization algorithm to align item features, the problem of insufficient feature alignment in cross-domain sequence recommendation is solved, thereby improving recommendation accuracy and effectiveness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-21
- Publication Date
- 2026-03-17
AI Technical Summary
Existing cross-domain sequence recommendation techniques neglect sequence-aware item feature alignment, resulting in inaccurate recommendation results.
By constructing a directed item association graph, optimizing item features using graph neural networks and feature-enhanced contrastive learning, and combining spectral adaptive information filtering algorithms and self-attention networks for item feature alignment, a cross-domain sequence recommendation model is obtained.
It realizes the collaborative and temporal association of item features within a single recommendation domain. The aligned features facilitate sequence preference modeling and improve the accuracy and effectiveness of cross-domain sequence recommendation.
Smart Images

Figure CN118132846B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cross-domain sequence recommendation technology, specifically to a cross-domain sequence recommendation method and system based on sequence-aware item feature alignment. Background Technology
[0002] Traditional sequence recommendation systems are limited to modeling within a single recommendation scenario, and are often hampered by the widespread data sparsity problem in recommendation systems, resulting in unsatisfactory modeling performance. Therefore, cross-domain sequence recommendation systems have been proposed to alleviate this problem. These systems aim to transfer knowledge gained from modeling in a relatively data-rich source domain to a relatively sparse target domain, thereby improving recommendation performance.
[0003] Currently, cross-domain sequence recommendation systems can be broadly classified into two categories: cross-domain sequence recommendation methods based on carefully designed knowledge transfer modules (such as using gated recurrent neural networks to perform knowledge transfer between different recommendation domains), and methods based on self-supervised learning techniques to alleviate data sparsity problems, thereby enabling better knowledge transfer between different recommendation domains.
[0004] However, both of the aforementioned methods focus on constructing self-supervised learning tasks at the model layer, neglecting to align the input item features of the sequence recommendation model. The lack of aligned item features can mislead subsequent sequence preference modeling, resulting in limited representations of user sequence preferences and ultimately suboptimal recommendation results. Therefore, existing cross-domain sequence recommendation techniques suffer from inaccurate recommendation results due to their neglect of aligning the sequence-aware item features of the sequence recommendation model. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the shortcomings of existing technologies, this invention provides a cross-domain sequence recommendation method and system based on sequence-aware item feature alignment, which solves the problem of inaccurate recommendation results caused by neglecting the alignment of sequence-aware item features in existing cross-domain sequence recommendation technologies.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] In a first aspect, this invention proposes a cross-domain sequence recommendation method based on sequence-aware item feature alignment, the method comprising:
[0010] The user historical behavior sequences from different domains are obtained separately, and the user historical behavior sequences from different domains are integrated based on timestamp information to obtain the global user interaction sequence.
[0011] Based on the user's historical behavior sequence in different domains, a directed item association graph for each domain is obtained, and based on the global user interaction sequence, a global directed item association graph is obtained.
[0012] Based on the directed item association graph of each domain, the item features are optimized by graph neural network and feature-enhanced contrastive learning, respectively, and the optimized local item features of each domain are obtained. At the same time, the optimized global item representation is obtained based on the optimized local item features of different domains.
[0013] The spectrum-based adaptive information filtering algorithm filters the spectrum of the optimized global item representation, obtains the filtered global item features, and uses the filtered global item features to align some features of the items.
[0014] A cross-domain sequence recommendation model is obtained by modeling the aligned item features based on a self-attention network.
[0015] The user's sequence preferences are obtained based on the optimized cross-domain sequence recommendation model.
[0016] Preferably, the directed item association graph based on each domain is used sequentially to optimize item features using graph neural networks and feature-enhanced contrastive learning, thereby obtaining optimized local item features for each domain. Simultaneously, an optimized global item representation is obtained based on the optimized local item features from different domains, including:
[0017] S31. Based on the directed item association graph and item feature embedding vector of each domain, respectively, a graph neural network is used to incorporate collaborative association information into the local item features of each domain;
[0018] S32. Contrastive learning based on feature enhancement further incorporates temporal correlation information into the local item features of each domain;
[0019] S33. The local item features optimized from different domains are concatenated to obtain the global item representation, and the global item representation is optimized using graph neural networks and feature-enhanced contrastive learning to obtain the optimized global item representation.
[0020] Preferably, the spectrum-based adaptive information filtering algorithm filters the spectrum of the optimized global item representation to obtain filtered global item features, and uses the filtered global item features to perform partial feature alignment of items, including:
[0021] Establish a learnable filter distribution for the recommendation domain X. The filter v is obtained by sampling from it, and the filtering operation is then performed as follows:
[0022]
[0023]
[0024] Where, μ X Let I represent a learnable vector, used as the mean of the filter distribution; let I represent the identity matrix, used as the covariance of the filter distribution; and let T represent the transpose of the matrix. This represents an intermediate quantity when transforming filter v; This represents the optimized global item representation; This indicates global item characteristics after filtering by the X domain;
[0025] Then, partial feature alignment of items is performed based on the global item features filtered by recommendation domains X and Y. The specific process is as follows:
[0026]
[0027] in, This represents the cross-domain item feature alignment loss function; |B| represents the amount of data used for model training. as well as These are the filtered global item features. and The vector obtained based on index i; and These are the optimized local item features. and The vector obtained from index i; τ represents the temperature coefficient of the comparative learning.
[0028] Preferably, the process corresponding to step S31 includes:
[0029]
[0030]
[0031] in, This represents the representation of the l-th layer of the graph neural network; A represents the representation of the (l-1)th layer of a graph neural network; X This represents the directed item association graph corresponding to the recommendation domain X; Norm() represents the normalization operation on the input directed item association graph; The initial input to the graph neural network is represented by l; l (l∈[1,2,...,L]) represents the number of layers in the graph neural network. This represents the local item features corresponding to the recommendation domain X, which incorporate collaborative association information.
[0032] Preferably, the loss function corresponding to step S32 includes:
[0033]
[0034] Where |B| represents the amount of data used for model training; cos(.,.) represents cosine similarity; and τ is the temperature hyperparameter. This indicates optimized local item features. The vector obtained based on indices i and j; This represents the item features before the introduction of temporal association information, after incorporating collaborative association information. The vector obtained based on index i.
[0035] Secondly, this invention also proposes a cross-domain sequence recommendation system based on sequence-aware item feature alignment, the system comprising:
[0036] The user sequence acquisition module is used to acquire user historical behavior sequences from different domains, and integrate the user historical behavior sequences from different domains based on timestamp information to obtain a global user interaction sequence.
[0037] The directed item association graph acquisition module is used to acquire the directed item association graph of each domain based on the corresponding user historical behavior sequence of different domains, and to acquire the global directed item association graph based on the global user interaction sequence.
[0038] The item feature acquisition module is used to optimize the item features based on the directed item association graph of each domain by successively using graph neural networks and feature-enhanced contrastive learning, thereby acquiring the optimized local item features for each domain, and simultaneously acquiring the optimized global item representation based on the optimized local item features of different domains.
[0039] The partial feature alignment module is used to filter the spectrum of the optimized global item representation using a spectrum-based adaptive information filtering algorithm, obtain the filtered global item features, and use the filtered global item features to perform partial feature alignment of the items.
[0040] The cross-domain sequence recommendation model acquisition module is used to model the aligned item features based on a self-attention network to obtain a cross-domain sequence recommendation model.
[0041] The result acquisition module is used to obtain the user's sequence preferences based on the optimized cross-domain sequence recommendation model.
[0042] Preferably, when the item feature acquisition module acquires item features, the execution steps include:
[0043] S31. Based on the directed item association graph and item feature embedding vector of each domain, respectively, a graph neural network is used to incorporate collaborative association information into the local item features of each domain;
[0044] S32. Contrastive learning based on feature enhancement further incorporates temporal correlation information into the local item features of each domain;
[0045] S33. The local item features optimized from different domains are concatenated to obtain the global item representation, and the global item representation is optimized using graph neural networks and feature-enhanced contrastive learning to obtain the optimized global item representation.
[0046] Preferably, when the partial feature alignment module performs partial feature alignment of an item, it includes:
[0047] Establish a learnable filter distribution for the recommendation domain X. The filter v is obtained by sampling from it, and the filtering operation is then performed as follows:
[0048]
[0049]
[0050] Where, μ X Let I represent a learnable vector, used as the mean of the filter distribution; let I represent the identity matrix, used as the covariance of the filter distribution; and let T represent the transpose of the matrix. This represents an intermediate quantity when transforming filter v; This represents the optimized global item representation; This indicates global item characteristics after filtering by the X domain;
[0051] Partial feature alignment of items is performed based on the global item features filtered by recommendation domains X and Y. The specific process is as follows:
[0052]
[0053] in, This represents the cross-domain item feature alignment loss function; |B| represents the amount of data used for model training. as well as These are the filtered global item features. and The vector obtained based on index i; and These are the optimized local item features. and The vector obtained from index i; τ represents the temperature coefficient of the comparative learning.
[0054] Preferably, the process corresponding to step S31 includes:
[0055]
[0056]
[0057] in, This represents the representation of the l-th layer of the graph neural network; A represents the representation of the (l-1)th layer of a graph neural network; X This represents the directed item association graph corresponding to the recommendation domain X; Norm() represents the normalization operation on the input directed item association graph; The initial input to the graph neural network is represented by l; l (l∈[1,2,...,L]) represents the number of layers in the graph neural network. This represents the local item features corresponding to the recommendation domain X, which incorporate collaborative association information.
[0058] Preferably, the loss function corresponding to step S32 includes:
[0059]
[0060] Where |B| represents the amount of data used for model training; cos(.,.) represents cosine similarity; and τ is the temperature hyperparameter. This indicates optimized local item features. The vector obtained based on indices i and j; This represents the item features before the introduction of temporal association information, after incorporating collaborative association information. The vector obtained based on index i.
[0061] (III) Beneficial Effects
[0062] This invention provides a cross-domain sequence recommendation method and system based on sequence-aware item feature alignment. Compared with existing technologies, it has the following advantages:
[0063] This invention proposes a cross-domain sequence recommendation technology based on sequence-aware item feature alignment. Directed item association graphs are constructed based on user historical behavior sequences and global user interaction sequences from different domains. Then, based on these graphs, item features are optimized sequentially using graph neural networks and feature-enhanced contrastive learning. This yields optimized local item features and global item representations for each domain. Next, an adaptive information filtering algorithm is used to filter the spectrum of the optimized global item representations, and partial feature alignment is performed using the filtered global item features. Finally, a self-attention network is used to model the aligned item features, and model optimization is performed to obtain a cross-domain sequence recommendation model, thereby obtaining the user's sequence preferences. This invention achieves item feature alignment within a single recommendation domain based on collaborative and temporal associations between items, while achieving adaptive partial alignment between different recommendation domains. The aligned item features greatly facilitate the subsequent sequence preference modeling process, resulting in better user sequence preference representations, improved cross-domain sequence recommendation accuracy, and better cross-domain sequence recommendation performance.
[0064] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0065] Figure 1 This is a flowchart of a cross-domain sequence recommendation method based on sequence-aware item feature alignment according to the present invention;
[0066] Figure 2 This is an embodiment of a cross-domain sequence recommendation method based on sequence-aware item feature alignment according to an embodiment of the present invention;
[0067] Figure 3 The figure shows the experimental results comparing the method of this invention with the conventional method. Detailed Implementation
[0068] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0069] This application provides a cross-domain sequence recommendation method and system based on sequence-aware item feature alignment, which solves the problem that existing cross-domain sequence recommendation technologies suffer from inaccurate recommendation results due to neglecting the alignment of sequence-aware item features, thereby achieving the goal of providing users with better recommendation results.
[0070] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0071] Example 1:
[0072] Firstly, this invention proposes a cross-domain sequence recommendation method based on sequence-aware item feature alignment, see [link to relevant documentation]. Figure 1 The method includes:
[0073] S1. Obtain the user historical behavior sequences from different domains respectively, and integrate the user historical behavior sequences from different domains based on timestamp information to obtain the global user interaction sequence.
[0074] S2. Obtain a directed item association graph for each domain based on the user's historical behavior sequence for different domains, and obtain a global directed item association graph based on the global user interaction sequence.
[0075] S3. Based on the directed item association graph of each domain, the item features are optimized by graph neural network and feature-enhanced contrastive learning, respectively, and the optimized local item features of each domain are obtained. At the same time, the optimized global item representation is obtained based on the optimized local item features of different domains.
[0076] S4. The spectrum-based adaptive information filtering algorithm filters the spectrum of the optimized global item representation, obtains the filtered global item features, and uses the filtered global item features to align some features of the items.
[0077] S5. Model the aligned item features based on a self-attention network to obtain a cross-domain sequence recommendation model;
[0078] S6. Obtain the user's sequence preferences based on the optimized cross-domain sequence recommendation model.
[0079] This embodiment proposes a cross-domain sequence recommendation method based on sequence-aware item feature alignment. It constructs directed item association graphs based on user historical behavior sequences and global user interaction sequences from different domains. Then, based on these graphs, it optimizes item features using graph neural networks and feature-enhanced contrastive learning, obtaining optimized local item features and global item representations for each domain. Next, it filters the spectrum of the optimized global item representation using an adaptive spectral information filtering algorithm, and aligns partial item features using the filtered global item features. Finally, it models and optimizes the aligned item features using a self-attention network, and uses the optimized model to obtain a cross-domain sequence recommendation model, thereby obtaining the user's sequence preferences. This embodiment achieves item feature alignment within a single recommendation domain based on collaborative and temporal associations between items, while achieving adaptive partial alignment between different recommendation domains. The aligned item features greatly facilitate the subsequent sequence preference modeling process, resulting in better user sequence preference representations and improving the accuracy of cross-domain sequence recommendation.
[0080] The following is in conjunction with the appendix Figure 1-2 The following section provides a detailed explanation of the implementation process of an embodiment of the present invention, including the specific steps S1-S6. For ease of explanation and elaboration, this embodiment selects recommendation domains X and Y as different recommendation domains for cross-domain recommendation; however, the actual technical solution is not limited to only two recommendation domains.
[0081] S1. Obtain the user historical behavior sequences from different domains, and integrate the user historical behavior sequences from different domains based on timestamp information to obtain the global user interaction sequence.
[0082] For recommendation domains X and Y with the same user set (i.e., the same users exist in different recommendation domains, denoted by set U, which contains a certain number of users), the historical interaction records between users and items are sorted according to the timestamp order, thus obtaining the user historical behavior sequences Seq for the two recommendation domains X and Y, respectively. X Seq Y Meanwhile, to ensure the data quality of subsequent results, the user's historical behavior sequence Seq was analyzed separately. X Seq Y Preprocessing is performed to remove excessively short sequence data, ensuring a sufficient number of interactions for each user and item. Based on this, the interaction sequences of the same user across two domains are integrated using timestamp information to obtain the corresponding global user interaction sequence Seq for that user. For example, for a specific user, recommendation domain X and recommendation domain Y are integrated into a global user interaction sequence Seq according to the chronological order of their historical actions, in the form of "XXYXYYYYXYX".
[0083] S2. Obtain a directed item association graph corresponding to each domain based on the user's historical behavior sequence in different domains, and obtain a global directed item association graph based on the global user interaction sequence.
[0084] Given a user's historical behavior sequence, based on the temporal relationship, if an item v i+1 Following item v in the user's historical behavior sequence i After that, and v does not exist in the item association graph. i to v i+1 If there is a directed edge, then add a v to the corresponding item association graph. i to v i+1 Directed edges. Here, i represents the item number. For each user's historical behavior sequence Seq... X Seq Y The global interaction sequence executes the above operations, resulting in three directed item association graphs: recommendation domain X, recommendation domain Y, and the global graph, which correspond to A, B, C, and D respectively. X A Y And A.
[0085] S3. Based on the directed item association graph of each domain, the item features are optimized by graph neural network and feature-enhanced contrastive learning, respectively, and the optimized local item features of each domain are obtained. At the same time, the optimized global item representation is obtained based on the optimized local item features of different domains.
[0086] S31. Based on the directed item association graph and item feature embedding vector of each domain, respectively, a graph neural network is used to incorporate collaborative association information into the local item features of each domain.
[0087] First, word embedding is used to map the items in the two recommendation domains X and Y to learnable embedding vectors. Here, the item feature embedding vector E corresponds to recommendation domain X. X Y is the item feature embedding vector corresponding to the recommendation domain E. Y Then, based on the directed item association graph corresponding to each domain, a graph neural network is used to obtain item features that incorporate collaborative association information.
[0088] Taking the recommendation domain X as an example, given the directed item association graph A constructed in step S2... X Local item features incorporating collaborative association information are obtained through the LightGCN graph neural network. First, the representation of layer l is generated from the representation of layer l-1 of the graph neural network. Then, the average of all representations from layers l to l is calculated. The input representation is the local item feature incorporating collaborative association information. The specific steps are as follows:
[0089]
[0090]
[0091] in, This represents the representation of the l-th layer of the graph neural network; A represents the representation of the (l-1)th layer of a graph neural network; X This represents the directed item association graph corresponding to the recommendation domain X; Norm() represents the row normalization operation, which normalizes the input directed item association graph. The initial input to the graph neural network is E. X ; l (l∈[1,2,...,L]) represents the number of layers in the graph neural network; This represents the local item features corresponding to the recommendation domain X, which incorporate collaborative association information.
[0092] Similarly, following the same method described above, the directed item association graph A based on the recommendation domain Y is... Y We can obtain the local item features corresponding to the recommendation domain Y that incorporate collaborative association information.
[0093] S32. Feature-enhanced contrastive learning further incorporates temporal correlation information into the local item features of each domain.
[0094] Then, through contrastive learning based on feature enhancement, local item features incorporating collaborative association information are added. Introduce time-series correlation information. The specific steps are as follows:
[0095] Seq is the sequence of user historical behavior where items in the X recommendation domain are located in a training batch. X The sequence is fed into a gated recurrent unit (GRU) to obtain the sequence representation. Subsequently based on sequence characterization Learning a Gaussian distribution of noise mean and variance Based on a Gaussian distribution, a random noise β is sampled from it, and then used to construct feature-enhanced contrastive learning samples. Here, α controls the noise intensity. After data augmentation, temporal correlation information is incorporated into the item features through contrastive learning, resulting in optimized local item features. The loss function corresponding to this process is:
[0096]
[0097] Where |B| represents the batch size of the model training (i.e., the amount of data input to the model for training each time during the machine learning model training process); cos(.,.) represents the cosine similarity; and τ is a temperature hyperparameter. This indicates optimized local item features. The vector obtained based on indices i and j; This represents the item features before the introduction of temporal association information, after incorporating collaborative association information. The vector obtained based on index i.
[0098] In the above process, the introduction of collaborative association information and temporal association information both align item features within a single domain. Collaborative association means that if the same item is purchased by different users, then other items purchased by different users are also considered to be related; it is a kind of sequence-based association. Specifically, within a single recommendation domain, if users a and b purchase the same item T1, then if user a also purchases item T2, then user b is also likely to purchase item T2. Temporal association means that if a user purchases items T1, T2, T3, and T4 in sequence, then there is an ordered property among T1, T2, T3, and T4; it is a kind of item association information within a sequence.
[0099] Similarly, using steps S31 and S32, the optimized local item features of the recommendation domain Y can be obtained.
[0100] S33. The local item features optimized from different domains are concatenated to obtain the global item representation, and the global item representation is optimized using graph neural networks and feature-enhanced contrastive learning to obtain the optimized global item representation.
[0101] The optimized local item features are obtained in the above steps. and Then, the item embedding vector E of the recommendation domain X is embedded. X And the item embedding vector E of the recommendation domain Y Y The concatenation is performed and considered as a global item feature embedding vector. Then, similar to steps S31 and S32 above, a graph neural network LightGCN is used to obtain a global item representation enhanced with collaborative association information. Then, through contrastive learning based on feature enhancement, local item features are... and After splicing, then combine with the global item representation. By performing comparative learning, an optimized global item representation is obtained.
[0102] The sequence-aware feature enhancement method proposed in step S3, compared to previous feature enhancement methods, achieves a full extraction of sequence task information. This sequence-aware feature enhancement method decomposes the information contained in the sequence into collaborative association information between items in different sequences and temporal association information between items in the same sequence. Compared to the random noise in traditional feature enhancement methods, this step incorporates collaborative association information and temporal association information into the feature enhancement noise, constructing sequence-aware noise. Furthermore, the feature enhancement method based on sequence-aware noise incorporates the item collaborative association information and temporal association information, which are crucial for sequence recommendation tasks, into the item features, effectively solving the problem of item feature misalignment.
[0103] S4. The spectrum-based adaptive information filtering algorithm filters the spectrum of the optimized global item representation, obtains the filtered global item features, and uses the filtered global item features to align some features of the items.
[0104] Design a spectral adaptive information filtering algorithm for the optimized global item representation. The spectrum is filtered. This process allows for the extraction of optimized global item representations. This process filters out some useless information, and the filtering process is adaptive. Here, the adaptive information filtering algorithm of the spectrum is specifically used to optimize the global item representation through the recommendation domain X. The filtering process:
[0105] First, a learnable filter distribution is established for the recommendation domain X. The filter v is obtained by sampling from it, and the filtering operation is then performed as follows:
[0106]
[0107]
[0108] Where, μ X Let I represent a learnable vector, used as the mean of the filter distribution; let I represent the identity matrix, used as the covariance of the filter distribution; and let T represent the transpose of the matrix. This represents an intermediate quantity when transforming filter v; This represents the optimized global item representation; This indicates global item characteristics after filtering for the X domain.
[0109] Given a global item representation, filtering will be performed twice: once using a filter for domain X and once using a filter for domain Y. Similarly, the same operation can be performed on the recommendation domain Y.
[0110] Then, partial feature alignment of the items is performed using the global item features filtered based on recommendation domains X and Y. See the following formula for details:
[0111]
[0112] in, This represents the cross-domain item feature alignment loss function; |B| represents the batch size of the model training (i.e., the amount of data input to the model for training each time during the machine learning model training process); as well as These are the filtered global item features. and The vector obtained based on index i; similarly, and These are the optimized local item features. and The vector obtained from index i; τ is a constant representing the temperature coefficient for comparative learning.
[0113] In this step, by studying the spectrum of item features, it was found that different components of the item feature spectrum have varying degrees of transferability between different recommendation domains. Therefore, this embodiment designs an adaptive information filter for the spectrum. This filter, through gradient optimization of a neural network, can achieve adaptive filtering for different components of the spectrum and different recommendation domains, thereby achieving partial alignment between item features in different recommendation domains.
[0114] S5. Model the aligned item features based on a self-attention network to obtain a cross-domain sequence recommendation model.
[0115] Given a user's historical behavior sequence, it is mapped to an aligned sequence of item features, which is then fed into a self-attention network (including but not limited to SASRec and other self-attention networks) to model and obtain an initial cross-domain sequence recommendation model. Through this model, given a user's historical behavior sequence, the user's sequence preferences H and H' can be obtained. X H Y For example, given a user's historical behavior sequence: item T1->item T2->item T3, after mapping, the sequence of item names becomes a sequence of vectors, such as (0.01,0.02,0.9)->(0.5,0.2,0.9)->(3,2,0.9).
[0116] S6. Obtain the user's sequence preferences based on the optimized cross-domain sequence recommendation model.
[0117] Optimizing the cross-domain sequence recommendation model involves jointly optimizing the recommendation tasks. Three sequence recommendation training tasks are constructed for the recommendation domain X, Y, and the global domain, respectively. An annealing algorithm is introduced to dynamically adjust the weights between the sequence recommendation tasks. Finally, stochastic gradient descent is used to jointly optimize the overall framework, resulting in the optimized cross-domain sequence recommendation model. Using this optimized model, given a user's historical behavior sequence, accurate user sequence preferences are obtained. Furthermore, based on the user's personalized preferences, specific item names are provided in descending order, thus achieving accurate cross-domain sequence recommendations.
[0118] This completes the entire process of a cross-domain sequence recommendation method based on sequence-aware item feature alignment.
[0119] Furthermore, to verify the superiority of the cross-domain sequence recommendation method based on sequence-aware item feature alignment proposed in this embodiment, experiments were conducted. The experiments constructed cross-domain sequence recommendation tasks based on three public datasets: Food-Kitchen, Movie-Book, and Entertainment-Education, and obtained the recommendation performance of different recommendation algorithms on the three tasks. Among them, CA-CDSR is the method proposed in this embodiment. The experimental results are as follows: Figure 3 As shown, see Figure 3 It can be observed that the method proposed in this embodiment achieves higher results than all other comparative algorithms when compared with the evaluation metrics (higher is better) of three representative recommendation systems, namely MRR, NDCG@10 and HR@10, in cross-domain sequence recommendation scenarios represented by three public datasets. This further verifies the superior performance of the cross-domain sequence recommendation method in sequence recommendation scenarios.
[0120] Example 2:
[0121] Secondly, the present invention also provides a cross-domain sequence recommendation system based on sequence-aware item feature alignment, the system comprising:
[0122] The user sequence acquisition module is used to acquire user historical behavior sequences from different domains, and integrate the user historical behavior sequences from different domains based on timestamp information to obtain a global user interaction sequence.
[0123] The directed item association graph acquisition module is used to acquire the directed item association graph of each domain based on the corresponding user historical behavior sequence of different domains, and to acquire the global directed item association graph based on the global user interaction sequence.
[0124] The item feature acquisition module is used to optimize the item features based on the directed item association graph of each domain by successively using graph neural networks and feature-enhanced contrastive learning, thereby acquiring the optimized local item features for each domain, and simultaneously acquiring the optimized global item representation based on the optimized local item features of different domains.
[0125] The partial feature alignment module is used to filter the spectrum of the optimized global item representation using a spectrum-based adaptive information filtering algorithm, obtain the filtered global item features, and use the filtered global item features to perform partial feature alignment of the items.
[0126] The cross-domain sequence recommendation model acquisition module is used to model the aligned item features based on a self-attention network to obtain a cross-domain sequence recommendation model.
[0127] The result acquisition module is used to obtain the user's sequence preferences based on the optimized cross-domain sequence recommendation model.
[0128] Optionally, when the item feature acquisition module acquires item features, the following steps are performed:
[0129] S31. Based on the directed item association graph and item feature embedding vector of each domain, respectively, a graph neural network is used to incorporate collaborative association information into the local item features of each domain;
[0130] S32. Contrastive learning based on feature enhancement further incorporates temporal correlation information into the local item features of each domain;
[0131] S33. The local item features optimized from different domains are concatenated to obtain the global item representation, and the global item representation is optimized using graph neural networks and feature-enhanced contrastive learning to obtain the optimized global item representation.
[0132] Optionally, when the partial feature alignment module performs partial feature alignment of an item, it includes:
[0133] Establish a learnable filter distribution for the recommendation domain X. The filter v is obtained by sampling from it, and the filtering operation is then performed as follows:
[0134]
[0135]
[0136] Where, μ X Let I represent a learnable vector, used as the mean of the filter distribution; let I represent the identity matrix, used as the covariance of the filter distribution; and let T represent the transpose of the matrix. This represents an intermediate quantity when transforming filter v; This represents the optimized global item representation; This indicates global item characteristics after filtering by the X domain;
[0137] Partial feature alignment of items is performed based on the global item features filtered by recommendation domains X and Y. The specific process is as follows:
[0138]
[0139] in, This represents the cross-domain item feature alignment loss function; |B| represents the amount of data used for model training. as well as These are the filtered global item features. and The vector obtained based on index i; and These are the optimized local item features. and The vector obtained from index i; τ represents the temperature coefficient of the comparative learning.
[0140] Optionally, the process corresponding to step S31 includes:
[0141]
[0142]
[0143] in, This represents the representation of the l-th layer of the graph neural network; A represents the representation of the (l-1)th layer of a graph neural network; X This represents the directed item association graph corresponding to the recommendation domain X; Norm() represents the normalization operation on the input directed item association graph; The initial input to the graph neural network is represented by l; l (l∈[1,2,...,L]) represents the number of layers in the graph neural network. This represents the local item features corresponding to the recommendation domain X, which incorporate collaborative association information.
[0144] Optionally, the loss function corresponding to step S32 includes:
[0145]
[0146] Where |B| represents the amount of data used for model training; cos(.,.) represents cosine similarity; and τ is the temperature hyperparameter. This indicates optimized local item features. The vector obtained based on indices i and j; This represents the item features before the introduction of temporal association information, after incorporating collaborative association information. The vector obtained based on index i.
[0147] It is understood that the cross-domain sequence recommendation system based on sequence-aware item feature alignment provided in this embodiment of the invention corresponds to the cross-domain sequence recommendation method based on sequence-aware item feature alignment described above. The explanations, examples, and beneficial effects of the relevant content can be referred to the corresponding content in the cross-domain sequence recommendation method based on sequence-aware item feature alignment, and will not be repeated here.
[0148] In summary, compared with existing technologies, it has the following beneficial effects:
[0149] 1. This invention proposes a cross-domain sequence recommendation technology based on sequence-aware item feature alignment. Directed item association graphs are constructed based on user historical behavior sequences and global user interaction sequences from different domains. Then, based on these graphs, graph neural networks and feature-enhanced contrastive learning are used to optimize item features, obtaining optimized local item features and global item representations for each domain. Next, an adaptive information filtering algorithm is used to filter the spectrum of the optimized global item representations, and the filtered global item features are used to align partial item features. Finally, a self-attention network is used to model the aligned item features, and model optimization is performed to obtain a cross-domain sequence recommendation model, thereby obtaining user sequence preferences. This invention achieves item feature alignment within a single recommendation domain based on collaborative and temporal associations between items, while achieving adaptive partial alignment between different recommendation domains. The aligned item features greatly facilitate the subsequent sequence preference modeling process, resulting in better user sequence preference representations, improved cross-domain sequence recommendation accuracy, and better cross-domain sequence recommendation performance.
[0150] 2. This invention incorporates collaborative and temporal association information into the noise of the feature enhancement through a sequence-aware feature enhancement method, constructing sequence-aware noise. Based on the feature enhancement method implemented by the sequence-aware noise, the collaborative and temporal association information of items, which is crucial for the sequence recommendation task, is incorporated into the features of the items, solving the problem of misalignment of item features and helping to improve the effect of cross-domain sequence recommendation.
[0151] 3. The adaptive feature spectrum filter (corresponding to the adaptive information filtering algorithm of the spectrum) proposed in this invention can achieve adaptive filtering for different components of the spectrum and different recommendation domains through gradient optimization of the neural network, thereby achieving efficient partial alignment between item representations in different recommendation domains and further improving the effect of cross-domain sequence recommendation.
[0152] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0153] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A cross-domain sequential recommendation method based on sequence-aware item feature alignment, characterized in that, The method comprises: respectively acquiring user historical behavior sequences of different domains, and integrating user historical behavior sequences in different domains based on timestamp information to obtain global user interaction sequences; correspondingly acquiring a directed item association graph of each domain based on the user historical behavior sequences of different domains, and acquiring a global directed item association graph based on the global user interaction sequences; based on the directed item association graph of each domain, first using a graph neural network and then using feature enhancement-based contrast learning to optimize item features, correspondingly acquiring optimized local item features of each domain, and simultaneously acquiring an optimized global item representation based on the optimized local item features of different domains; filtering the spectrum of the optimized global item representation based on a spectrum-based adaptive information filtering algorithm, acquiring filtered global item features, and using the filtered global item features to perform partial feature alignment of items; based on a self-attention network, modeling the aligned item features to obtain a cross-domain sequence recommendation model; based on the optimized cross-domain sequence recommendation model, acquiring a user's sequence preference; the directed item association graph of each domain, first using a graph neural network and then using feature enhancement-based contrast learning to optimize item features, correspondingly acquiring optimized local item features of each domain, and simultaneously acquiring an optimized global item representation based on the optimized local item features of different domains, comprising: S31, based on the directed item association graph and the item feature embedding vector of each domain, respectively, using a graph neural network to integrate collaborative association information into the local item features of each domain; S32, based on feature enhancement-based contrast learning, further integrating time sequence association information into the local item features of each domain; S33, concatenating the optimized local item features of different domains to obtain a global item representation, and using a graph neural network and feature enhancement-based contrast learning to optimize the global item representation to obtain an optimized global item representation; the spectrum-based adaptive information filtering algorithm filters the spectrum of the optimized global item representation to obtain filtered global item features, and uses the filtered global item features to perform partial feature alignment of items, comprising: Set up a learnable filter distribution for the recommended domain X From which the filter v is sampled, and then the filtering operation proceeds as follows: wherein μ X represents a learnable vector used as the mean of the filter distribution; I represents an identity matrix used as the covariance of the filter distribution; T represents the transpose of a matrix; represents an intermediate quantity when transforming the filter v; represents the optimized global item representation; represents the global item feature filtered for the X domain; performing partial feature alignment of items by filtering the global item features of the recommendation domains X and Y, and the specific process is as follows: wherein, represents the cross-domain item feature alignment loss function; |B| represents the data size for model training; and are filtered global item features and are vectors obtained according to index i in and are optimized local item features and are vectors obtained according to index i in; τ represents the temperature coefficient of contrast learning.
2. The method of claim 1, wherein, the process corresponding to the S31 step comprises: wherein, represents the representation of the l-th layer of the graph neural network; represents the representation of the l-1-th layer of the graph neural network;A X represents the directed item association graph corresponding to the recommendation domain X; Norm() represents a normalization operation on the input directed item association graph; represents the initial input of the graph neural network; l (l ∈ 【1, 2, …, L】) represents the number of layers of the graph neural network; represents the local item feature fused with the collaborative association information corresponding to the recommendation domain X.
3. The method of claim 1, wherein, the loss function corresponding to the S32 step comprises: Wherein, |B| represents the data size of model training; cos(.,.) represents the cosine similarity; τ is a temperature hyperparameter; represents the optimized local item feature the vector obtained according to the index i, j in the middle; represents the item feature before the introduction of the time correlation information after the integration of the collaborative correlation information the vector obtained according to the index i in the middle.
4. A cross-domain sequential recommendation system based on sequence-aware item feature alignment, characterized in that, the system comprises: a user sequence acquisition module for respectively acquiring user historical behavior sequences of different domains, and integrating user historical behavior sequences in different domains based on timestamp information to obtain global user interaction sequences; a directed item association graph acquisition module for correspondingly acquiring a directed item association graph of each domain based on the user historical behavior sequences of different domains, and acquiring a global directed item association graph based on the global user interaction sequences; The item feature acquisition module is configured to optimize item features by using a graph neural network and feature-enhanced contrastive learning based on the directed item association graph of each domain, to obtain optimized local item features of each domain, and to obtain an optimized global item representation based on the optimized local item features of different domains. The partial feature alignment module is configured to filter the spectrum of the optimized global item representation based on a spectral adaptive information filtering algorithm, to obtain filtered global item features, and to perform partial feature alignment of items by using the filtered global item features. The cross-domain sequence recommendation model acquisition module is configured to model the aligned item features based on a self-attention network, to obtain a cross-domain sequence recommendation model. The result acquisition module is configured to obtain a sequence preference of a user based on the optimized cross-domain sequence recommendation model. When the item feature acquisition module acquires item features, the execution steps include: S31, based on the directed item association graph and the item feature embedding vector of each domain, respectively, the graph neural network is used to integrate collaborative association information into the local item features of each domain. S32, based on feature-enhanced contrastive learning, further integrate time sequence association information into the local item features of each domain. S33, the local item features of different domains are spliced to obtain a global item representation, and the global item representation is optimized by using the graph neural network and the feature-enhanced contrastive learning, to obtain an optimized global item representation. When the partial feature alignment module performs partial feature alignment of items, it includes: Set up a learnable filter distribution for the recommended domain X From which the filter v is sampled, and then the filtering operation proceeds as follows: wherein μ X represents a learnable vector used as the mean of the filter distribution; I represents an identity matrix used as the covariance of the filter distribution; T represents the transpose of a matrix; represents an intermediate quantity when transforming the filter v; represents the optimized global item representation; represents the global item features filtered for the X domain; The partial feature alignment of items is performed by filtering the global item features of the recommendation domains X and Y, and the specific process is as follows: in, This represents the cross-domain item feature alignment loss function; |B| represents the amount of data used for model training. as well as These are the filtered global item features. and The vector obtained based on index i; and These are the optimized local item features. and The vector obtained from index i; τ represents the temperature coefficient of the comparative learning.
5. The system of claim 4, wherein, The process corresponding to the S31 step includes: wherein, represents the representation of the l-th layer of the graph neural network; represents the representation of the l-1-th layer of the graph neural network;A X represents the directed item association graph corresponding to the recommendation domain X; Norm() represents a normalization operation on the input directed item association graph; represents the initial input of the graph neural network; l (l ∈ 【1, 2, …, L】) represents the number of layers of the graph neural network; represents the local item feature fused with the collaborative association information corresponding to the recommendation domain X.
6. The system of claim 4, wherein, The loss function corresponding to the S32 step includes: Wherein, |B| represents the data size of model training; cos(.,.) represents the cosine similarity; τ is the temperature hyperparameter; represents the optimized local item feature the vector obtained according to the index i, j in the middle; represents the item feature before the introduction of the time correlation information after the integration of the collaborative correlation information the vector obtained according to the index i in the middle.