Transform sequence recommendation system and method based on discrete Fourier transform enhancement and storage medium

By introducing dynamic time regularization and discrete Fourier transform into the Transformer sequence recommendation model, the problems of insufficient capture of high-frequency signals and neglect of time spans are solved, achieving more accurate user interest recommendations.

CN120670937APending Publication Date: 2025-09-19SHANDONG NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510713090.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-30
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The existing Transformer sequence recommendation model has difficulty in effectively capturing high-frequency user signals and ignores the time span of user interactions, resulting in slow response when user interests change rapidly. It also fails to effectively integrate user rating information to distinguish interest preferences.

Method used

A discrete Fourier transform-enhanced Transformer sequence recommendation system is introduced. Through a dynamic time regularization layer and a multi-head attention mechanism-discrete Fourier high-pass filter layer, it captures users' long-term consistency and short-term dynamic preferences, and combines user rating information for item recommendations.

Benefits of technology

The model's sensitivity and accuracy to changes in user interests are improved, and it can better capture users' short-term dynamics and long-term consistency preferences, thereby enhancing the accuracy and adaptability of recommendations and adapting to different types of user behavior patterns.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120670937A_ABST
    Figure CN120670937A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of sequence recommendation, in particular to a Transform sequence recommendation system and method based on discrete Fourier transform enhancement and a storage medium. Time is normalized by using a softmax function through a dynamic time regularization layer; by introducing a neural network based on discrete Fourier transform, automatic learning and optimization processing of time sequence data are realized. According to the method, the project recommendation can be made by integrating the short-term dynamic interest preference and the long-term consistency preference of the user, and the project recommendation is given based on the dynamic time sequence and is fused with the score of the user for the project, so that the obtained prediction result better conforms to the user preference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of sequence recommendation, and in particular to a discrete Fourier transform-enhanced Transformer sequence recommendation system, method, and storage medium. Background Art

[0002] Sequential recommendation predicts users' preferences for future items by mining temporal patterns in their historical interactions. The difficulty in predicting user preferences lies in the dynamic and complex nature of user behavior data, which is influenced by both long-term consistent preferences and short-term fluctuations in interest.

[0003] Transformer-based sequence recommendation models, such as SASRec and BER4Rec, capture long-range dependencies through self-attention mechanisms, but they still have to overcome the limitations of the Transformer itself. First, the inherent low-pass filtering of traditional Transformer models causes them to tend to capture low-frequency signals in sequences and have difficulty effectively identifying high-frequency signals. This characteristic causes the model to be slow to respond to rapid changes in user interests and cannot achieve accurate push notifications. In addition, the fixed-position encoding method of traditional Transformer models ignores the time span of user interactions, resulting in biased item recommendations in sensitive scenarios. In addition, users' interest preferences are reflected in their ratings of items, but existing technologies simply integrate this information as auxiliary features and fail to distinguish such signals through semantic fusion mechanisms, which limits the granularity of preference modeling. Summary of the Invention

[0004] First, the present application provides a Transformer sequence recommendation system based on discrete Fourier transform enhancement, which can make project recommendations based on the user's short-term dynamic interest preferences and long-term consistency preferences, and the project recommendations are based on dynamic time series and integrated with the user's ratings of the projects.

[0005] The technical solution of this application is as follows: In a first aspect, the present application provides a discrete Fourier transform-enhanced Transformer sequence recommendation system, the system comprising: Embedding layer, used to generate an interaction sequence embedding matrix representing the interaction relationship between users and items; The interaction sequence embedding matrix includes an interaction sequence, wherein the interaction sequence includes items and scores and interaction times corresponding to the items; The scores of all items constitute the score sequence, and the interaction times of all items constitute the interaction time series; The core layer, which includes the user preference layer, the dynamic time regularization layer, and the multi-head attention mechanism-discrete Fourier high-pass filter layer; The user preference layer embeds the user's rating sequence for the project into the interaction sequence embedding matrix to generate a preference interaction sequence embedding representation; The dynamic time regularization layer embeds the interaction time series between the user and the item into the preference interaction sequence embedding representation to generate the time preference interaction sequence embedding representation; The multi-head attention mechanism-discrete Fourier high-pass filter layer includes a multi-head attention mechanism layer and a discrete Fourier high-pass filter layer; The multi-head attention mechanism layer captures the user's long-term consistent preference representation in the temporal preference interaction sequence embedding representation; The discrete Fourier high-pass filter layer is a neural learning network with discrete Fourier transform, which is used to capture the short-term dynamic preference representation of users in the embedded representation of the time preference interaction sequence; In the multi-head attention mechanism-discrete Fourier high-pass filter layer, the user's preference representation is obtained based on the user's long-term consistent preference representation and short-term dynamic preference representation; Fully connected network layer; Residual link normalization layer; The prediction layer calculates the user's preference score for the item based on the user's preference representation and the item's rating representation, and determines the user's predicted interaction item based on the preference score; The rating of an item is represented by the mean of the ratings of all users who purchased the item.

[0006] In a second aspect, the present application provides a Transformer sequence recommendation method based on discrete Fourier transform enhancement, comprising the following steps: S1. Get users Interaction sequence for interactive items and the user's rating sequence for the interactive items and interactive time series , according to the maximum length of the sequence N Intercept or supplement the obtained sequence to obtain 、 、 ; S2. According to the total number of projects and the embedding dimension D Constructing the embedding matrix of the items , according to the embedding matrix M Identify the user The interaction sequence embedding matrix ; S3. Group by rating level and the embedding dimensionD Construct the user-item rating embedding matrix , according to the score embedding matrix Identify the user The rating embedding matrix ;Will and The corresponding elements in the vector are concatenated through the multi-layer perceptron to obtain the preference interaction sequence embedding matrix ; S4. Adoption The function will Normalize the time series in to get the time preference interaction sequence embedding representation ; S5. As the query vector, key vector and value vector in the multi-head attention mechanism, based on the multi-head attention mechanism to capture Medium users Long-term consistent preference representation ; Will Input to the neural learning network with discrete Fourier transform to learn China to capture Short-term dynamic preference representation in ; based on and After training, the user Preference representation : ; S6. Input to the fully connected network layer and the residual link normalization layer for global feature transformation and normalization respectively; S7. Calculate the user's preference score for the item based on the user's preference representation and the item's rating representation: ; Where, represents the preference score, p represents probability calculation, represents the item that the user will interact with next, Represents a user Interaction sequence , Display items v The embedding representation of Display items v Embedded representation of the mean of all ratings; The item with the highest preference score is taken as the user's predicted interaction item.

[0007] Furthermore, in step S4, The calculation method is: ; ; Where, express middle The weight of express No. k item, represents a hyperparameter between 0 and 1, Indicates the j The interval between the time node of each interactive project and the latest interactive project.

[0008] Furthermore, in step S5, The capture method is: ; ; ; ; Where, Represents the multi-head attention mechanism in Transformer; denote the query vector, key vector, and value vector in the multi-head attention mechanism, respectively, and ; represents the connection function; h Indicates the number of parallel attention mechanism layers; 、 、 、 They represent the parameter matrices of the science department in the neural network.

[0009] Furthermore, in step S5, The capture method is: ; ; ; Where, Represents low-frequency signals; Represents high-frequency signals; 、 、 、 Represent different learnable parameters respectively; , Represent two different multi-layer perceptrons respectively;DFT represents the discrete Fourier transform, IDFT Represents the inverse discrete Fourier transform.

[0010] Further, in step S3, the scoring level set is ; In step S7, The mean of all the scores represented by Embed.

[0011] Furthermore, in step S7, the preference score is optimized using the cross entropy loss function, and the optimization model is as follows: ; Where, represents the loss function value, Represents the predicted score for the real item.

[0012] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the method described above when executed by a processor.

[0013] Due to the adoption of the above technical solution, the beneficial effects of this application are as follows: 1. The discrete Fourier transform-enhanced Transformer sequence recommendation system of this application realizes project prediction based on user behavior preferences. According to common sense and experience, the user's next interaction project is often more affected by recent interaction projects than previous interaction projects. Under the above premise, the position encoding continued by the traditional Transformer sequence recommendation model ignores the difference in time span, and cannot reflect the impact of the time series on the next interaction, and naturally cannot reflect recent preferences in the prediction results. In this application, the dynamic time regularization layer uses the softmax function to normalize the time, so that the time series is in a reasonable influence range, and through the hyperparameters Each interactive item has a minimum impact on the prediction result. Finally, the time regularization layer distributes the user behavior sequence according to the time distance, that is, the time preference interaction sequence embedding representation , the proportion of impact on the next project.

[0014] 2. Traditional time-series recommendation systems rely on simple filters or hand-crafted feature extraction methods, which can lag behind in capturing changes in user preferences. The present application's sequence recommendation system and method introduce a discrete Fourier transform-based neural network that automatically learns and optimizes time-series data to adapt to users' immediate needs. Specifically, the neural network automatically adjusts training parameters during training to optimally filter out noise and retain important signal features. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] The drawings described herein are used to provide further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute improper limitations on the present application.

[0016] Figure 1 This is a diagram of the architecture of a discrete Fourier transform-enhanced Transformer sequence recommendation system provided by this application; Figure 2 This is a comparison chart of the ablation experiments of various variant models in the embodiments of this application. DETAILED DESCRIPTION

[0017] Based on the background technology, see the attached Figure 1 , the present application provides a Transformer sequence recommendation system based on discrete Fourier transform enhancement, the system comprising: Embedding layer, used to generate an interaction sequence embedding matrix representing the interaction relationship between users and items; The interaction sequence embedding matrix includes an interaction sequence, wherein the interaction sequence includes items and scores and interaction times corresponding to the items; The scores of all items constitute the score sequence, and the interaction times of all items constitute the interaction time series.

[0018] The core layer, which includes the user preference layer, the dynamic time regularization layer, and the multi-head attention mechanism-discrete Fourier high-pass filter layer; The user preference layer embeds the user's rating sequence for the project into the interaction sequence embedding matrix to generate a preference interaction sequence embedding representation; The dynamic time regularization layer embeds the interaction time series between the user and the item into the preference interaction sequence embedding representation to generate the time preference interaction sequence embedding representation; The multi-head attention mechanism-discrete Fourier high-pass filter layer includes a multi-head attention mechanism layer and a discrete Fourier high-pass filter layer; The multi-head attention mechanism layer captures the user's long-term consistent preference representation in the temporal preference interaction sequence embedding representation; The discrete Fourier high-pass filter layer is a neural learning network with discrete Fourier transform, which is used to capture the short-term dynamic preference representation of users in the embedded representation of the time preference interaction sequence; In the multi-head attention mechanism-discrete Fourier high-pass filter layer, the user's preference representation is obtained based on the user's long-term consistent preference representation and short-term dynamic preference representation; Fully connected network layer; Residual link normalization layer; The prediction layer calculates the user's preference score for the item based on the user's preference representation and the item's rating representation, and determines the user's predicted interaction item based on the preference score; The rating of an item is represented by the mean of the ratings of all users who purchased the item.

[0019] The Transformer sequential recommendation system based on discrete Fourier transform enhancement is called the Preference and Temporal-Enhanced Sequential Recommendation System (PTSRec). The overall system framework is an improvement on the traditional Transformer architecture. The embedding layer converts user ratings and items into learnable high-dimensional dense vectors. The core layer includes a user preference layer, a dynamic temporal regularization layer, and a multi-head attention mechanism-discrete Fourier high-pass filter layer. The core layer integrates the discrete Fourier transform and the multi-head attention mechanism. The former captures users' short-term dynamic interests and preferences, while the latter captures users' long-term consistent preferences. The fully connected layer aggregates temporal features through nonlinear transformations, enhancing the ability to model interest preferences. The residual link normalization layer refines features through residual connections and layer normalization, using a dropout strategy to prevent overfitting. The prediction layer outputs ratings through a fusion prediction function.

[0020] In the embedding layer, users interact with items to generate interaction sequences, which include items, interaction time, and a score for each item. In practice, the score level can be customized.

[0021] The user's ratings on all items constitute a rating sequence, and the user's interaction time with each item constitutes an interaction time series.

[0022] In the user preference layer, the user's rating sequence for an item is embedded into the interaction sequence embedding matrix to generate a preference interaction sequence embedding representation. The dynamic temporal regularization layer embeds the user-item interaction time series into the preference interaction sequence embedding representation to generate a temporal preference interaction sequence embedding representation. In the temporal preference interaction sequence embedding representation, user behavior is augmented with evaluation information. User behavior represents the interaction between the user and the item, and the semantic information of the evaluation represents the rating sequence.

[0023] In the dynamic time regularization layer, based on common sense and experience, the user's next interaction item is often more affected by the recent interaction items than the previous interaction items. Under the above premise, the traditional Transformer sequence recommendation model continues the position encoding, which ignores the difference in time span and cannot reflect the impact of the time series on the next interaction. Naturally, it cannot reflect the recent preference in the prediction results. In this application, the dynamic time regularization layer uses the softmax function to normalize the time, so that the time series is in a reasonable influence range. Through the hyperparameter This ensures that each interactive item has the lowest impact on the prediction result. Finally, the temporal regularization layer distributes user behavior sequences according to their temporal distance, i.e., embedding the temporal preference interaction sequence to represent the weight of its impact on the next item.

[0024] The multi-head attention mechanism-discrete Fourier high-pass filter layer is the foundational layer of the Transformer model, used to enhance the feature representation capabilities of parallel computation, effectively capturing long-range dependencies. This allows the model to flexibly adapt to different types of tasks and input features, enhancing generalization and adaptability. The multi-head attention mechanism allows the model to extract information from different representation subspaces at different locations. The discrete Fourier high-pass filter layer is a neural network based on the discrete Fourier transform. By automatically learning and optimizing filters for processing time series data, it better adapts to users' immediate needs. The neural network automatically adjusts training parameters during training to optimally filter out noise and preserve important signal features.

[0025] Fully connected network layers and residual link normalization layers are the foundational layers of the Transformer. A fully connected network is a fundamental neural network architecture in which every neuron is connected to all neurons in the previous layer. The primary function of fully connected layers is to learn complex patterns in input data through linear transformations and nonlinear activation functions. The residual link normalization layer adjusts the network's activation values, reducing internal covariate shift, accelerating training, and improving model stability, thereby enhancing network convergence and ultimate performance.

[0026] The prediction layer is the last layer of PTSRec. In the prediction layer, the system predicts the user's next interactive item based on the user's preference score for the item. The higher the score, the more recommended the item is.

[0027] Based on the above system, this application provides a Transformer sequence recommendation method based on discrete Fourier transform enhancement, including the following steps: S1. Get users Interaction sequence for interactive items and the user's rating sequence for the interactive items and interactive time series , according to the maximum length of the sequence N Intercept or supplement the obtained sequence to obtain 、 、 .

[0028] The maximum length of the sequence is determined according to the requirements. If the length of the sequence is insufficient, it is padded with 0. In the three sequences of S1, the elements in the sequence correspond one to one according to the subscript.

[0029] S2. According to the total number of projects and the embedding dimension D Constructing the embedding matrix of the items , according to the embedding matrix M Identify the user The interaction sequence embedding matrix That is, in the matrix M, extract the user The embeddings corresponding to the interacting items.

[0030] S3. Group by rating level and the embedding dimension D Construct the user-item rating embedding matrix , according to the score embedding matrix Identify the user The rating embedding matrix ;Will and The corresponding elements in the vector are concatenated through the multi-layer perceptron to obtain the preference interaction sequence embedding matrix ; The method to obtain is as follows: ; The dimension of the representation vector obtained by MLP concatenation is D vector.

[0031] S4. Adoption The function will Normalize the time series in to get the time preference interaction sequence embedding representation ; In step S4, The calculation method is: ; ; express middle The weight of express The kth item of represents a hyperparameter between 0 and 1, Represents the interval between the time node of the jth interaction item and the latest interaction item. This is a hyperparameter greater than 0 and less than 1. Its purpose is to ensure that each interacted item has the lowest possible impact on the predicted item. The traditional Transformer sequential recommendation model uses positional encoding, which ignores the variability of user sequence time spans and cannot accurately reflect the impact of time spans on the next interaction. In this embodiment, time is directly regularized, using it as a weight to influence preference aggregation.

[0032] S5. As the query vector, key vector and value vector in the multi-head attention mechanism, based on the multi-head attention mechanism to capture Medium users Long-term consistent preference representation ; Will Input to the neural learning network with discrete Fourier transform to learn China to capture Short-term dynamic preference representation in ; based on and After training, the user Preference representation : ; In step S5, The capture method is: ; ; ; ; Where, Represents the multi-head attention mechanism in Transformer; denote the query vector, key vector, and value vector in the multi-head attention mechanism, respectively, and ; represents the connection function; h Indicates the number of parallel attention mechanism layers; S6. The input is sent to the fully connected network layer and the residual link normalization layer for global feature transformation and normalization respectively; S7. Calculate the user's preference score for the item based on the user's preference representation and the item's rating representation: ; Where, .

[0033] The item with the highest preference score is taken as the user's predicted interaction item.

[0034] In specific implementation, the scoring level set is ; That is, the user's rating of the project is 1 to 5 points. In step S7, The mean of all the scores represented by Embed.

[0035] In step S7, the preference score is optimized using the cross entropy loss function, and the optimization model is as follows: ; Where, represents the loss function value, Represents the predicted score for the real item.

[0036] The task of predicting the next item is regarded as a classification task on the entire item set, so the cross entropy loss function is used for model optimization.

[0037] To validate the aforementioned systems and methods, a dataset was selected for verification. Garden, Office, Music, and Beauty are four subcategories of the Amazon dataset, which contains a series of product reviews crawled from Amazon.com. These datasets are widely used for sequential recommendation tasks. The dataset includes reviews (ratings, text, helpfulness votes), product metadata (descriptions, category information, price, brand, and image features), and links ("Also Viewed" / "Also Purchased" graphs). To facilitate the experiments, the data was cleaned, retaining only four items: user, item, rating, and occurrence time. The number of interactions between users and items used in the experiments was at least five.

[0038] The statistical table of experimental data is shown in Table 1.

[0039] Table 1 Experimental data statistics In this embodiment, there are two evaluation indicators: HR: The proportion of correctly predicted samples in the prediction result list to all samples, that is, whether the items the user wants are recommended, emphasizing the "accuracy" of the prediction: .

[0040] NDCG: A recommendation system usually returns a list of items for a user. Assuming the list length is K, NDCG@K can be used to evaluate the difference between the ranked list and the user's actual interaction list: .

[0041] The proposed model is compared with the baseline model. The following describes each model: SASRec: This model effectively captures long-term user behavior patterns by combining the strengths of Markov chains and recurrent neural networks. Leveraging a self-attention mechanism, the model extracts the most relevant information from a user's historical behavior, focusing predictions on a small number of key past actions. This approach not only improves recommendation accuracy but also reduces the model's computational complexity, enabling it to excel when processing long sequences of data.

[0042] BERT4Rec: This model draws on the BERT architecture used in natural language processing and uses a deep bidirectional self-attention mechanism to capture dynamic user preferences. Unlike traditional unidirectional models, it allows each item to be predicted by considering both past and future interaction information, overcoming the limitations of unidirectional models. This bidirectional modeling approach enables a more comprehensive understanding of user behavior sequences, improving the diversity and accuracy of recommendations.

[0043] STOSA: This model addresses the limitations of traditional deterministic Transformer methods in handling the uncertainty of user-item interactions by representing item embeddings as random Gaussian distributions. This model introduces a Wasserstein self-attention module, enhancing its ability to capture the uncertainty in user-item interactions. Furthermore, it incorporates a novel ranking loss regularization method, significantly improving recommendation performance in cold-start scenarios.

[0044] FMLPRec: This model integrates a learnable filtering algorithm to mitigate overfitting caused by noisy log data. Inspired by signal processing techniques, this model enhances the robustness of recommendations by attenuating noise in the frequency domain. It also effectively filters out noise from user behavior data, improving the model's generalization capabilities in complex scenarios.

[0045] DuoRec: This model addresses the representation degradation problem in sequence deep learning models by introducing a contrastive regularization mechanism. Using contrastive learning, this model reshapes the distribution of sequence representations and enhances the diversity of item embeddings. This not only better captures user behavior patterns but also prevents the model from falling into local optima during training, thereby improving both the diversity and accuracy of recommendations.

[0046] FEARec: The model introduces ContraNorm, a novel normalization technique designed to combat oversmoothing in graph neural networks and Transformers. Using contrastive learning principles, ContraNorm makes representations more evenly distributed, alleviating the dimensionality collapse problem. In this way, it better captures complex patterns in user-item interactions, improving the accuracy and robustness of recommendations.

[0047] BSARec: The model uses Fourier transform to inject inductive bias, considering both low-frequency and high-frequency information in user-item interaction sequences. The model combines this frequency information with the self-attention mechanism to balance the inductive bias. It can better capture the periodic patterns and sudden changes in user behavior, thus performing well in recommendation tasks.

[0048] Experimental parameters: The experiment was implemented using PyTorch on an Nvidia 4090 GPU equipped with CUDA 12.2. The optimal hyperparameters were searched based on the recommended hyperparameters of the baseline model. The experiment was conducted under the following hyperparameter settings: the maximum sequence length of the user was selected from the range of {30, 40, 50, 60, 70}, and the optimal embedding dimension was selected from the range of {16, 32, 64, 128, 256}. At the same time, an early stopping strategy was adopted, with delta set to 0.05 and patience set to 3. The batch size was set to 256 and the learning rate was set to 0.001. The number of PTS blocks L was set to 2, and the number of attention heads in the Transformer was set to 0. h Set to 2.

[0049] The experimental results are shown in Table 2.

[0050] Table 2 Experimental results An analysis of the differences in algorithm performance revealed significant differences in the performance of these algorithms on different datasets when comparing them to other algorithms such as SASRec, STOSA, BERT4Rec, FMLPRec, DuoRec, and FEARec. For example, the SASRec algorithm achieved the best performance on the Garden dataset, but its performance on the Beauty dataset was less than satisfactory. Similarly, the FEARec algorithm performed well on the Office, Music, and Beauty datasets, but failed to reach the best level on the Garden dataset. This suggests that these algorithms have poor adaptability and stability when processing different datasets. This difference may be due to the inherent limitations of each algorithm when processing different types of data. For example, SASRec performs poorly when processing sparse data, while FEARec may face high computational complexity when processing high-dimensional data.

[0051] Among all the compared algorithms, the BSARec algorithm was one of the best performing, aside from PTSRec. BSARec's strong performance is primarily due to its improved model's ability to identify high-frequency signals. By enhancing the model's high-pass filtering capabilities, BSARec can more effectively capture high-frequency signals in user behavior, thereby improving recommendation quality. Furthermore, BSARec introduces an adaptive learning mechanism to further optimize the model's performance across diverse datasets, enabling it to demonstrate greater flexibility and accuracy in handling complex user behavior patterns.

[0052] Compared to BSARec, the PTSRec algorithm achieves at least 28.38% improvement on the Garden dataset and at least 13.62% improvement on the Office dataset. These significant performance gains are attributed to several improvements in PTSRec: Enhanced Preference Representation: By enhancing the representation of user preferences, PTSRec significantly deepens the model's understanding of user behavior and enables more nuanced capture of changes in user preferences. This improvement provides the model with richer semantic information, making it more adaptable in personalized recommendations. Dynamic Temporal Regularization: PTSRec introduces a dynamic temporal regularization mechanism, replacing traditional positional information encoding, enabling the model to more effectively capture the temporal dynamics of user behavior. This mechanism not only improves sensitivity to long-term and short-term interests but also enhances the model's performance in processing user temporal behavior. Optimized Low-Pass Filtering: To address the potential overfitting issue of the Transformer model, PTSRec optimizes low-pass filtering performance. By automatically adjusting hyperparameters, it reduces reliance on manual tuning, thereby improving the model's generalization and robustness. Adaptability to diverse application scenarios: Thanks to these improvements, PTSRec demonstrates greater stability and wider applicability across diverse application scenarios. Whether processing sparse or high-dimensional data, PTSRec maintains high recommendation quality, demonstrating its strong potential in complex recommendation systems.

[0053] To further validate the effectiveness of PTSRec, we conducted ablation experiments. Specifically, we designed several variants of the PTSRec model, gradually removing or replacing key components to explore the impact of different modules on the performance of the recommendation system. Each variant adjusts a specific design within the model to reveal its role in the overall model.

[0054] PTSRec-R: This variant removes user ratings of items and retains only the interaction sequences between users and items. This allows us to evaluate the importance of rating information in the model, especially in capturing user preferences and item characteristics.

[0055] PTSRec-T: This variant removes the temporal regulation mechanism of user-item interactions, that is, it no longer considers the temporal order and interval of user behaviors. In this way, the impact of temporal information on recommendation performance can be studied.

[0056] PTSRec-P: This variant removes the temporal regulation mechanism and instead uses traditional positional encoding to capture the order of user interaction sequences. This allows us to compare the effectiveness of temporal regulation and positional encoding in capturing sequence order.

[0057] PTSRec-D: This variant removes the high-pass filtering operation and retains only the multi-head self-attention mechanism. This allows us to examine the contribution of the high-pass filtering operation to the model performance.

[0058] See attached Figure 2 The results of the ablation experiments are analyzed as follows: The recommendation performance of all PTSRec variant models has declined, verifying the importance of the design of the original PTSRec model, such as rating information, temporal regulation, position encoding, and high-pass filtering. Despite this, all variant models outperform the baseline model BSARec, demonstrating the overall robustness of the PTSRec model. Among them, the PTSRec-D variant performs the worst, indicating that the high-pass filtering operation is crucial for improving the recommendation performance of transformer-based sequential recommendation models, especially when dealing with high-frequency noise and sparse data.

[0059] Comparisons of the PTSRec-T, PTSRec-P, and standard PTSRec models show that incorporating temporal factors significantly improves the performance of recommendation systems, and that temporal conditioning is more effective than positional encoding in capturing sequential order. The temporal conditioning mechanism better reflects the dynamics of user behavior, particularly when addressing fluctuations in user interests and short-term preferences. Furthermore, comparative analysis of PTSRec-R and PTSRec further confirms the positive impact of user rating information on improving recommendation performance, particularly its importance in capturing explicit user feedback and item characteristics.

[0060] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned sequence recommendation method.

[0061] The aforementioned computer-readable storage medium may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0062] The technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present disclosure. The aforementioned storage medium may be a non-transitory storage medium, including: a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disk, and other media that can store program code, or a transient storage medium.

[0063] Anything not described in this application can be achieved by adopting or drawing on existing technologies.

[0064] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A discrete Fourier transform-enhanced Transformer sequence recommendation system, characterized in that: The system comprises: Embedding layer, used to generate an interaction sequence embedding matrix representing the interaction relationship between users and items; The interaction sequence embedding matrix includes an interaction sequence, wherein the interaction sequence includes items and scores and interaction times corresponding to the items; The scores of all items constitute the score sequence, and the interaction times of all items constitute the interaction time series; The core layer, which includes the user preference layer, the dynamic time regularization layer, and the multi-head attention mechanism-discrete Fourier high-pass filter layer; The user preference layer embeds the user's rating sequence for the project into the interaction sequence embedding matrix to generate a preference interaction sequence embedding representation; The dynamic time regularization layer embeds the interaction time series between the user and the item into the preference interaction sequence embedding representation to generate the time preference interaction sequence embedding representation; The multi-head attention mechanism-discrete Fourier high-pass filter layer includes a multi-head attention mechanism layer and a discrete Fourier high-pass filter layer; The multi-head attention mechanism layer captures the user's long-term consistent preference representation in the temporal preference interaction sequence embedding representation; The discrete Fourier high-pass filter layer is a neural learning network with discrete Fourier transform, which is used to capture the short-term dynamic preference representation of users in the embedded representation of the time preference interaction sequence; In the multi-head attention mechanism-discrete Fourier high-pass filter layer, the user's preference representation is obtained based on the user's long-term consistent preference representation and short-term dynamic preference representation; Fully connected network layer; Residual link normalization layer; The prediction layer calculates the user's preference score for the item based on the user's preference representation and the item's rating representation, and determines the user's predicted interaction item based on the preference score; The rating of an item is represented by the mean of the ratings of all users who purchased the item.

2. A system sequence recommendation method based on claim 1, characterized in that: The following steps are involved: S1. Get users Interaction sequence for interactive items and the user's rating sequence for the interactive items and interactive time series , according to the maximum length of the sequence N Intercept or supplement the obtained sequence to obtain 、 、 ; S2. According to the total number of projects and the embedding dimension D Constructing the embedding matrix of the items , according to the embedding matrix M Identify the user The interaction sequence embedding matrix ; S3. Group by rating level and the embedding dimension D Construct the user-item rating embedding matrix , according to the score embedding matrix Identify the user The rating embedding matrix ;Will and The corresponding elements in the vector are concatenated through the multi-layer perceptron to obtain the preference interaction sequence embedding matrix ; S4. Adoption The function will Normalize the time series in to get the time preference interaction sequence embedding representation ; S5. As the query vector, key vector and value vector in the multi-head attention mechanism, based on the multi-head attention mechanism to capture Medium users Long-term consistent preference representation ; Will Input to the neural learning network with discrete Fourier transform to learn China to capture Short-term dynamic preference representation in ; based on and After training, the user Preference representation : ; S6. Input to the fully connected network layer and the residual link normalization layer for global feature transformation and normalization respectively; S7. Calculate the user's preference score for the item based on the user's preference representation and the item's rating representation: ; Where, represents the preference score, p represents probability calculation, represents the item that the user will interact with next, Represents a user Interaction sequence , Display items v The embedding representation of Display items v Embedded representation of the mean of all ratings; The item with the highest preference score is taken as the user's predicted interaction item.

3. The discrete Fourier transform enhanced Transformer sequence recommendation method according to claim 2, characterized in that: In step S4, The calculation method is: ; ; Where, express middle The weight of express No. k item, represents a hyperparameter between 0 and 1, Indicates the j The interval between the time node of each interactive project and the latest interactive project.

4. The discrete Fourier transform enhanced Transformer sequence recommendation method according to claim 3, characterized in that: In step S5, The capture method is: ; ; ; ; Where, Represents the multi-head attention mechanism in Transformer; denote the query vector, key vector, and value vector in the multi-head attention mechanism, respectively, and ; represents the connection function; h Indicates the number of parallel attention mechanism layers; 、 、 、 They represent the parameter matrices of the science department in the neural network.

5. The discrete Fourier transform enhanced Transformer sequence recommendation method according to claim 4, characterized in that: In step S5, The capture method is: ; ; ; Where, Represents low-frequency signals; Represents high-frequency signals; 、 、 、 Represent different learnable parameters respectively; , Represent two different multi-layer perceptrons respectively; DFT represents the discrete Fourier transform, IDFT Represents the inverse discrete Fourier transform.

6. The discrete Fourier transform enhanced Transformer sequence recommendation method according to claim 5, characterized in that: In step S3, the rating level set is ; In step S7, The mean of all the scores represented by Embed.

7. The method for recommending sequences based on discrete Fourier transform enhancement according to claim 6, characterized in that: In step S7, the preference score is optimized using the cross entropy loss function, and the optimization model is as follows: ; Where, represents the loss function value, Represents the predicted score for the real item.

8. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the program is executed by a processor, the method according to claim 7 is implemented.