Denoising sequence recommendation method and system based on continuous subsequences
By combining convolutional neural networks and Transformer technology, this method identifies and removes continuous noise subsequences in a sequence, solving the problem of difficulty in identifying continuous noise in existing methods and improving the accuracy of recommendation systems and user interest modeling.
Patent Information
- Application Number
- CN202511421819.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-30
- Publication Date
- 2026-01-02
AI Technical Summary
Existing sequence recommendation methods struggle to effectively remove noise when faced with continuous noisy subsequences, resulting in poor recommendation performance and inaccurate long-term interest modeling.
Using techniques such as convolutional neural networks, Transformer, and contrastive learning, continuous noisy subsequences are identified and removed through sliding window and adaptive segmentation mechanisms. The model is then optimized by combining the BPRLoss loss function to generate noise-free interactive sequences.
It improves the accuracy of recommendation systems and user interest modeling, enhances noise resistance, and is suitable for denoising sequence recommendations in recommendation systems.
Smart Images

Figure CN121256140A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of sequence recommendation denoising, and particularly relates to a denoising sequence recommendation method based on continuous sub-sequences and a system thereof. BACKGROUND
[0002] In recent years, recommendation systems have become a powerful tool for improving the user experience of online platforms, significantly improving the user experience in e-commerce shopping, short video playing and other scenarios. Its related technologies have also been widely applied and intensively researched in various fields of the Internet. Recommendation systems analyze users' personalized interests to filter out content that meets users' preferences from a vast amount of information, and have been widely applied in e-commerce, online reviews, advertising platforms and other basic services. The core is to learn user interests and effectively alleviate the problem of information overload. Traditional collaborative filtering technology mainly relies on pairwise user-item interactions, ignoring the natural temporal nature in user interaction sequences. This limitation hinders their ability to fully capture users' changing preferences over time in real-world recommendation scenarios, thus giving rise to sequence recommendation.
[0003] Sequence recommendation systems usually capture the dynamic changes of user preferences over time based on users' historical interaction sequences in the time dimension, and thus recommend the next item that users are most interested in. Sequence recommendation also models the context relationships and temporal dependencies between user behaviors to make accurate recommendations by mining the correlations between behaviors. In fact, historical interaction sequences often contain some inherent noise items that deviate from users' actual needs, such as accidental interactions or erroneous clicks. These inherent noise items interfere with the modeling of user interests by recommendation systems and cannot accurately reflect users' true preferences, thus misleading the next item recommendation and affecting the recommendation effect. Noise in sequence recommendation may exist in redundancy that occurs during data collection, the system may repeatedly incorrectly identify and record some same item attributes, or there may be repeated user interactions with the same item; it may also exist in data inconsistencies caused by human errors, unintentional clicks by users, or incorrect ratings of items; it may also exist in the influence of spam or fake data generated by malicious users, which seriously pollutes the real user data pool and seriously affects the quality of recommendations. In order to improve the performance and user experience of recommendation systems, denoising has become an important research direction in sequence recommendation. After removing noisy behaviors, user behavior sequences can more truly reflect their interest characteristics, and recommendation systems can better capture the dynamic characteristics of users' changing interests over time, improve the representation ability of user characteristics and item characteristics, and increase the context features such as time and location, so as to accurately model user interests.
[0004] In early studies, users' long-term interests are usually modeled by processing their entire interaction sequences using Transformer models, which are inevitably affected by inherent noise, leading to a certain deviation from users' actual interests. Current studies usually treat the noise in the sequence as isolated and discrete, without distinguishing different types of noise, such as discrete noise or continuous noise. However, recent studies have shown that noise is not just composed of isolated outliers, but also includes continuous noise sub-sequences with semantic association. In addition, some studies have shown that the denoised interaction sequence presents a high order, meaning that each item in the sequence maintains a strong contextual relationship with its adjacent items and is highly similar to the subsequent items. Existing denoising methods usually rely on the contextual semantic information of the user interaction sequence, identifying noise by analyzing the inconsistency between the item and its surrounding context. Specifically, when an item in the sequence has weak order with its surrounding items, the item is defined as noise. However, when the context information itself contains noise, these continuously stacked noise items tend to exhibit high similarity and order in the local sequence, and this context information instead negatively affects the denoising process. Such continuously stacked noise items are defined as noise sub-sequences. In the face of continuous noise sub-sequences, methods that rely solely on context information for denoising have limitations, as the noise items in these sub-sequences are highly correlated and difficult to identify.
[0005] The goal of denoising recommendation is to improve recommendation performance by mitigating the impact of noise in interaction sequences. Early research focused on bridging the gap between implicit feedback and user preferences through explicit user feedback (such as ratings and reviews). However, in real-world scenarios, collecting explicit user feedback is challenging, and its quality varies considerably, making sequence denoising using such supervised signals difficult. Therefore, denoising has shifted from a supervised learning task to an unsupervised learning challenge. Existing sequence denoising methods can be broadly categorized into three types. The first type achieves denoising by assigning different weights to interactions, typically adjusting these weights dynamically based on their importance. For example, some methods aim to reduce the impact of noise by discarding high-loss interactions or adaptively reducing the weight of high-loss samples. The second type reduces noise by directly removing interaction data identified as noise. These methods typically identify noise by learning signal inconsistencies at the user and sequence levels and generating noise-free interaction sequences. Some methods also employ adaptive correctors that apply multiple operations to eliminate noise without relying on additional labels or manual intervention. The third type of method employs data distillation techniques, compressing the entire dataset into small summaries to address noise issues. These methods utilize probabilistic reparameterization to transform discrete interactions into continuous interactions, thus better handling long-tailed distributions and spurious negative samples. While these methods have achieved some success in different scenarios, their effectiveness remains limited when dealing with continuous noisy subsequences, especially when noise terms are highly correlated. Traditional context-based denoising methods may be affected by the noise itself, impacting denoising performance. Summary of the Invention
[0006] In sequence recommendation scenarios, the presence of noise in the context information—specifically, the existence of continuous noisy subsequences within the sequence information—can negatively impact denoising, making it difficult to effectively remove noise and resulting in suboptimal recommendation performance. Furthermore, inherent noise in the sequence can lead to inaccurate long-term interest modeling. This invention proposes a denoising sequence recommendation method and system based on continuous subsequences, utilizing techniques such as convolutional neural networks, encoders, Transformers, and contrastive learning to fully integrate user-item interaction information.
[0007] This invention is achieved through the following technical solution: a method for recommending denoised sequences based on continuous subsequences. The method specifically includes the following steps: Step 1: Obtain and preprocess the user-item interaction dataset, dividing the dataset into training and test sets; Step 2: Construct a denoised sequence recommendation model based on continuous subsequences; Step 3: Train the denoising sequence recommendation model based on continuous subsequences constructed in Step 2 using the training set data divided in Step 1; Step 4: Perform interactive prediction on the denoising sequence recommendation model trained in Step 3 using the test set data divided in Step 1, and obtain the predicted interaction scores; Step 5: Generate a recommendation list based on the predicted interaction scores.
[0008] Further, in Step 1, Step 1.1: Obtain a user-item interaction dataset, ensuring that it contains all relevant user behavior and item interaction information; Step 1.2: Process the user-item interaction dataset, removing duplicate interactions, filtering outliers, and filling in missing values; Step 1.3: Divide the dataset into a training set and a test set.
[0009] Further, in Step 2, Step 2.1: Randomly initialize the item embeddings, use the embedding layer combined with the position embedding matrix to capture the temporal or sequential context, map the item IDs to a trainable embedding matrix, and generate the original embedding representation of the user-item interaction information; Step 2.2: Use the automatic truncation strategy to truncate the last m items in the user interaction sequence, concatenate them with the target item as input, and use a convolutional neural network to integrate information and aggregate modeling to obtain a short-term user interest representation; Step 2.3: Based on the sliding window strategy, use short-term interest as an auxiliary measurement standard, select representative user-item interaction subsequences through an adaptive segmentation mechanism, and use a Transformer to model long-term user interest; Step 2.4: Evaluate the reliability of continuous subsequences using a modeling scheme based on the length of continuous subsequences and user interest similarity, and use an adaptive denoising strategy to apply the trained denoising model for sequence denoising in the final stage; Step 2.5: Input the denoised embedding representation of user-item interaction information into a downstream common recommendation model based on representation learning to obtain the interaction prediction result; Step 2.6: Use the correct interactions in the prediction result as positive samples and other interactions as negative samples, and use the BPRLoss loss function to reduce the representation deviation between the predicted interactions and the correct interactions.
[0010] Further, in Step 2.4, the adaptive denoising strategy is as follows: First, the entire user interaction sequence is divided into original subsequences with similar semantics using a subsequence constructor. Subsequently, a dual judgment mechanism is constructed based on the length of the continuous noise subsequence and the cosine similarity between the continuous noise subsequence and the long-term interest. By iteratively identifying the noise subsequence, the noise subsequence is detected, and finally, a noise-free interaction sequence is generated.
[0011] Further, in step 3, Step 3.1: input the training set data divided in step 1 into the continuous subsequence-based denoising sequence recommendation method and system constructed in step 2, and obtain the denoised user-item interaction information; Step 3.2: input the denoised user-item interaction information obtained in step 3.1 into the downstream sequence recommendation model to obtain the interaction score prediction result; Step 3.3: input the interaction prediction result obtained in step 3.2 into the BPR Loss loss function; Step 3.4: minimize the loss function to train the model. Further, in step 4, Step 4.1: input the test set data divided in step 1 into the continuous subsequence-based denoising sequence recommendation model constructed in step 2; Step 4.2: obtain the interaction prediction result.
[0012] Further, in step 5, For each user in the test set, sort the item interaction prediction scores obtained in step 4 in descending order; filter the items that the user has interacted with to avoid duplicate recommendations, and take the Top-K as the final recommendation sequence.
[0013] A continuous subsequence-based denoising sequence recommendation system: The system comprises the following preprocessing module, model construction module, training module and prediction recommendation module; The preprocessing module acquires and preprocesses the user-item interaction dataset, and divides the dataset into a training set and a test set; The model construction module constructs a continuous subsequence-based denoising sequence recommendation model; The training module uses the training set data divided by the preprocessing module to train the continuous subsequence-based denoising sequence recommendation model constructed by the model construction module; The prediction recommendation module uses the test set data divided by the preprocessing module to perform interaction prediction on the denoising sequence recommendation method model trained by the training module, and obtains the predicted interaction score; and generates a recommendation list based on the predicted interaction score.
[0014] An electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0015] A computer-readable storage medium for storing computer instructions, which are executed by a processor to implement the steps of the above method.
[0016] Advantages of the present application The traditional sequence denoising method reduces the influence of noise by modeling the context information of the sequence, but when the context information itself contains noise, this method cannot accurately identify the distribution of noise in the sequence data; the present application solves the problem that the inherent noise in the user interaction sequence causes the modeling of the user's long-term preference to be inaccurate, and also solves the negative impact of continuous noise in the context information on denoising in the context information denoising method.
[0017] The present application obtains accurate long-term user interest by modeling the filtered user interaction sequence, while avoiding the influence of continuous noise sub-sequences on denoising, uses a combination of sliding window technology and Transformer technology, uses two judgment mechanisms to identify noise sub-sequences that deviate from the user interest representation, thereby achieving accurate identification of continuous noise data in the sequence; the present application also fully considers the influence of inherent noise in user interaction on long-term user interest modeling, proposes an accurate long-term user interest modeling method, improves the noise resistance and model performance, and is suitable for sequence recommendation denoising in the recommendation system. BRIEF DESCRIPTION OF DRAWINGS
[0018] Fig. 1 is a flowchart of the denoising sequence recommendation method based on continuous sub-sequences described in the present application; Fig. 2 is a model diagram of the denoising sequence recommendation method based on continuous sub-sequences described in the present application; Fig. 3 is a long-term interest extractor model diagram described in the present application; Fig. 4 is an iterative denoising module model diagram described in the present application. DETAILED DESCRIPTION
[0019] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor are within the scope of protection of the present application.
[0020] Unless otherwise specified, the experimental methods used in the following examples are conventional methods. Unless otherwise specified, the materials, reagents, methods, and instruments used are all conventional materials, reagents, methods, and instruments in the art, and can be obtained commercially by those skilled in the art.
[0021] Implementation Method 1: Combination Figs. 1 to 4 This invention proposes a denoising sequence recommendation method based on continuous subsequences. To avoid modeling the entire user interaction sequence, the methods filter the items interacted with by the user and model items that are closer to the user's long-term intent, thus better guiding the denoising process. Simultaneously, to effectively avoid the influence of inherent noise in the context information on sequence denoising, continuous noisy subsequences are used as the main body for overall identification, effectively avoiding the influence of inherent noise, accurately identifying noise in the sequence, and providing noise-free interaction sequences for downstream recommendation tasks, thereby improving the recommendation effect of sequence recommendation. The recommendation method specifically includes: Step 1: Obtain and preprocess the user-item interaction dataset, dividing the dataset into training and test sets; Step 1.1: Obtain the user-item interaction dataset, ensuring that the dataset contains all relevant user behavior and item interaction information. This data provides the sequence recommendation model with the interaction relationship between users and items. Step 1.2: Preprocess the user-item interaction dataset to remove duplicate interactions (repeated actions of the same user on the same item; rules for retaining the latest or most frequent records must be clearly defined); filter outliers (e.g., out-of-order interaction timestamps; define filtering thresholds to remove samples with very few user-item interactions); impute missing values (e.g., missing timestamps, item attributes, etc.; use linear interpolation or forward imputation methods to ensure data integrity and consistency); ensure data quality and improve the accuracy and effectiveness of model training. Step 1.3: Divide the dataset into training and test sets using appropriate partitioning methods (such as time series partitioning or random partitioning) to ensure the diversity and representativeness of the training and test sets.
[0022] Step 2: Construct a denoised sequence recommendation model based on continuous subsequences; Step 2.1: Obtain the original embedded representations of users and items using the embedding layer; First, the embedding representations of the user sequence items are randomly initialized. An embedding layer is used to encode the original interaction sequence and generate a hidden representation for each item in the sequence. The embedding layer creates dense, trainable representations for the items in the sequence and incorporates the positional information of each item to capture the temporal or sequential context of the interaction. The hidden representation is created by mapping the item ID to a trainable embedding matrix. To capture the positional effect of items in the sequence, a positional embedding matrix is introduced, as shown in Equation (1).
[0023]
[0024] This formula embodies the generation process of item embedding, where represents the one-hot vector of each item ID, represents the trainable matrix, H∈R n×d represents the item embedding matrix corresponding to each user interaction sequence, n represents the length of the user interaction sequence.
[0025] Step 2.2: Use automatic truncation strategy and convolutional neural network to model short-term user interest; In order to assist in modeling long-term user sequence, the automatic truncation strategy is used to truncate the last m items of the user interaction sequence as the core input, combined with the target item to model the short-term user interest using convolutional neural network, as shown in formula (2).
[0026]
[0027] where represents the embedding representation of the truncated core m user interactions, is the concatenation of the embedding representation of the core m user interactions and the final target item, which is the final input of the convolutional neural network. In order to effectively integrate the information of the above embedding, the model uses horizontal and vertical convolution operations with the same convolution step to obtain the final short-term user interest representation, as shown in formula (3).
[0028]
[0029] where represents the convolution operation, represents the result of horizontal convolution kernel max pooling, represents the result of vertical convolution kernel flattening, represents the result of connecting horizontal convolution kernels, represents the result of connecting vertical convolution kernels, and the final short-term user interest representation is obtained by aggregating the above two results, as shown in formula (4).
[0030]
[0031] Step 2.3: Use sliding window strategy and Transformer to model long-term user interest; Due to the ubiquitous noise in user interactions, directly modeling the whole interaction sequence can lead to inaccurate representation of long-term interests. An adaptive long-term interest modeling module is proposed, which does not directly model the whole interaction sequence, but selects more representative sub-sequences through an adaptive segmentation mechanism to more accurately capture the user's long-term interests. The key of the adaptive segmentation mechanism lies in determining the appropriate segmentation metric, using short-term interests as an auxiliary metric.
[0032] Existing research mainly models short-term interests through target items. Due to the inherent noise in user interaction sequences, the user interests obtained by modeling based on the sequence will inevitably deviate from their true interests. In order to quantify the impact of noise in the interaction sequence, it is assumed that there is a longest continuous noise segment in the sequence, with a length of K. Based on this assumption, through a dynamic interval sampling strategy, the original user interaction sequence is divided into K+1 non-overlapping interaction sub-sequences Specifically, the jth sub-sequence is defined as a continuous sequence in the original sequence that satisfies a certain condition, where the index i satisfies, as shown in equation (5).
[0033]
[0034] In order to accurately represent the user's long-term interest, instead of modeling the whole interaction sequence, the target sub-sequence that best reflects the user's long-term interest is selected from the K+1 sub-sequences as shown in equation (6).
[0035]
[0036] where represents a similarity calculation function. From this, the sub-sequence that best represents the user's true interest can be screened out for modeling, represents the embedding representation of the user's short-term interest, represents the embedding representation of the whole sequence of each sub-sequence. For the screened sub-sequence, a hybrid modeling method combining Transformer and Bi-LSTM is used. Then, through a gated fusion unit, the above representations are adaptively assigned weights and fused together to obtain a comprehensive representation of the user's long-term interest, as shown in equation (7).
[0037]
[0038] After obtaining the fused embedding, a normalization operation and a re-weighting distribution strategy are used to obtain an accurate user long-term interest, as shown in equation (8).
[0039]
[0040] Although the generated user long-term interest is considered accurate, there is no available signal to guide this learning process. A direct way to solve this problem is to incorporate the widely used Bayesian personalized ranking (BPR) loss. The BPR loss is defined as shown in equation (9).
[0041]
[0042] In the formula: represents a training data set, which consists of triplets , such that is an observed positive interaction, while is an unobserved negative interaction. The set of unobserved interactions is the Cartesian product of all users and items minus the set of observed positive interactions .
[0043] Step 2.4: Evaluate the credibility of continuous subsequences with a modeling scheme based on the length of continuous subsequences and the similarity of user interests, and use an adaptive denoising strategy to apply the trained denoising model for sequence denoising in the final stage; In order to better utilize user preferences as a guidance signal for sequence recommendation denoising, a preference-based continuous subsequence denoising scheme is designed to more effectively utilize the useful knowledge described above. First, the entire user interaction sequence is divided into original subsequences with similar semantics using a subsequence constructor. Subsequently, based on a dual judgment mechanism, including the length of continuous noise subsequences and the similarity of subsequences, the most likely noise subsequences are iteratively identified until the noise subsequences are accurately detected.
[0044] The specific divided subsequence is shown in equation (10):
[0045] wherein represents the window size of the sliding window technique, which is set to a fixed length in the embodiment, and the dual judgment mechanism of the second stage makes judgments in two aspects, one being the length of continuous noise subsequences, and the other being the similarity of continuous subsequences, which is calculated as shown in equation (11):
[0046] wherein represents the embedding representation of the user long-term interest, and for each subsequence, the similarity of the subsequence with the supervision signal is evaluated. If the similarity is high, the subsequence may not have potential noise, and further segmentation of the subsequence is needed to confirm whether there is real noise. Conversely, if the similarity is low, the subsequence should be classified as a continuous noise subsequence to be detected, and it should be removed directly. The reliability score of the corresponding sequence The calculation method is shown in formula (12).
[0047]
[0048] where (.) is a binary indicator function that outputs 1 when the condition is true, and β is a hyperparameter. If the calculated cosine similarity score is lower than the threshold β, the reliability weight of the sequence is set to 0, indicating that those interactions identified as noise with confidence will be removed directly.
[0049] The third stage assigns reliability weights to the sub-sequences by the similarity discriminator, thus promoting the preliminary identification of potential noise. However, since it is impossible to determine the length and distribution of continuous noise sub-sequences in advance, a method is proposed to identify potential noise by iteratively dividing the user interaction sequence into sub-sequences of different lengths. Specifically, the set of sub-sequences identified as noise-free by the similarity discriminator is re-input to the sub-sequence constructor for re-division, generating a new set of sub-sequences which are then evaluated again by the similarity discriminator. In the above process, the minimum length g of continuous noise sub-sequences is predefined. When the length of all sub-sequences identified as noise is greater than or equal to g and there is no new noise-free sub-sequence that needs to be re-divided, the iteration stops. As shown in formula (13).
[0050]
[0051] where is the final noise-free user sequence, is the embedding representation of the noise-free user sequence.
[0052] Step 2.5: Input the embedding representation of the denoised user-item interaction information into the downstream common recommendation model to obtain the interaction prediction result; The embedding representation of the noise-free user sequence can be input into various mainstream sequence recommendation models (downstream common recommendation models, including but not limited to GRU4Rec, SASRec), as shown in formula (14).
[0053]
[0054] where represents a sequence recommendation model based on representation learning, which takes the denoised item embedding sequence as input and generates a sequence-level representation .
[0055] Step 2.6: Correct interactions in the prediction results are taken as positive samples, and other interactions are taken as negative samples. The BPRLoss loss function is used to reduce the representation deviation between the predicted interactions and the correct interactions.
[0056] To perform the recommendation task, a probability distribution over the entire item set is needed. Specifically, for each item The probability calculation is shown in equation (15).
[0057]
[0058] To optimize, the following BPR loss function is minimized, as shown in equation (16).
[0059]
[0060] where is a hyperparameter that balances the BPR loss and the recommendation loss, is a hyperparameter, is a set of model parameters.
[0061] Step 3: Train the continuous sub-sequence-based denoising sequence recommendation model constructed in step 2 using the training set data divided in step 1; Specifically, the following steps are included: Step 3.1: Input the training set data divided in step 1 into the continuous sub-sequence-based denoising sequence recommendation model constructed in step 2 to obtain denoised user-item interaction information; Step 3.2: Input the denoised user-item interaction information obtained in step 3.1 into the downstream common sequence recommendation model to obtain interaction score prediction results; Step 3.3: Input the interaction prediction results obtained in step 3.2 into the BPR Loss loss function; Step 3.4: Minimize the loss function to train the model and update the model parameters.
[0062] Step 4: Perform interaction prediction using the test set data divided in step 1 on the denoising sequence recommendation method model trained in step 3 to obtain predicted interaction scores.
[0063] Step 4.1: Input the test set data divided in step 1 into the continuous sub-sequence-based denoising sequence recommendation model constructed in step 2; Step 4.2: Obtain interaction prediction results.
[0064] Step 5: Generate a recommendation list based on the predicted interaction scores.
[0065] For each user in the test set, sort the item interaction prediction scores obtained in step 4 in descending order; filter the items that the user has interacted with to avoid duplicate recommendations, and take the top-K as the final recommendation sequence.
[0066] Embodiment two: a denoising sequence recommendation system based on continuous subsequence: The system comprises the following preprocessing module, model construction module, training module and prediction recommendation module; The preprocessing module obtains and preprocesses the user-item interaction dataset, and divides the dataset into a training set and a test set; The model construction module constructs a denoising sequence recommendation model based on continuous subsequence; The training module trains the denoising sequence recommendation model based on continuous subsequence constructed by the model construction module using the training set data divided by the preprocessing module; The prediction recommendation module uses the test set data divided by the preprocessing module to perform interaction prediction on the denoising sequence recommendation model trained by the training module, obtains a predicted interaction score, and generates a recommendation list based on the predicted interaction score.
[0067] An electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the above method when executing the computer program.
[0068] A computer-readable storage medium for storing computer instructions, the computer instructions being executed by a processor to implement the steps of the above method.
[0069] The memory in the embodiments of the application can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Where the nonvolatile memory is a read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), electrically EPROM (EEPROM), or flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example, and not limitation, many forms of RAM are available, for example, static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM). Note that the memory described herein is intended to include, among others, these and any other memory suitable for storing the data adaptively described herein.
[0070] In the above embodiments, all or part of the methods can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the methods can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center through wired, such as coaxial cable, optical fiber, digital subscriber line (DSL), or wireless, such as infrared, wireless, microwave, etc. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. integrated with one or more available media sets. The available media can be a magnetic medium, such as a floppy disk, a hard disk, a magnetic tape, an optical medium, such as a high-density digital video disc (DVD), or a semiconductor medium, such as a solid state disc (SSD), etc.
[0071] In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor or the instruction in the form of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as hardware processor execution completion, or executed by a combination of hardware and software modules in the processor. The software module can be located in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, or other mature storage media in the art. The storage medium is located in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the above method. To avoid repetition, it will not be described in detail here.
[0072] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capability. In the implementation process, each step of the method embodiments can be completed by integrated logic circuits or instructions in the form of software in the processor. The processor can be a general processor, a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The disclosed methods, steps and logic block diagrams in the embodiments of the present application can be implemented or executed. The general processor can be a microprocessor or the processor can be any conventional processor. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as hardware code processor execution completion, or executed by hardware and software module combination in the code processor. The software module can be located in the random access memory, the flash memory, the read only memory, the programmable read only memory or the electrically erasable programmable memory, the register or the mature storage medium in the field. The storage medium is located in the memory, and the processor reads the information in the memory, and combines the hardware to complete the steps of the above method.
[0073] The above describes a continuous sub-sequence based denoising sequence recommendation method and system in detail, and the principle and implementation of the present application are described. The above embodiment is only used to help understand the method and core idea of the present application; at the same time, for the general technical personnel in the field, according to the idea of the present application, the specific implementation and application range will be changed, and the above description should not be understood as the limitation of the present application.
Claims
1. A method for recommending denoised sequences based on continuous subsequences, characterized in that: The method specifically includes the following steps: Step 1: Obtain and preprocess the user-item interaction dataset, dividing the dataset into training and test sets; Step 2: Construct a denoised sequence recommendation model based on continuous subsequences; Step 3: Use the training set data divided in Step 1 to train the denoising sequence recommendation model based on continuous subsequences constructed in Step 2; Step 4: Use the test set data divided in Step 1 to perform interactive prediction on the denoised sequence recommendation method model trained in Step 3, and obtain the predicted interactive score. Step 5: Generate a recommendation list based on the predicted interaction ratings.
2. The method according to claim 1, characterized in that: In step 1, Step 1.1: Obtain the user-item interaction dataset, ensuring that the dataset contains all relevant user behavior and item interaction information; Step 1.2: Process the user-item interaction dataset to remove duplicate interactions, filter outliers, and fill in missing values; Step 1.3: Divide the dataset into training and test sets.
3. The method according to claim 2, characterized in that: In step 2, Step 2.1: Randomly initialize the item embeddings, use the embedding layer combined with the position embedding matrix to capture the temporal or sequential context, map the item ID to the trainable embedding matrix, and generate the original embedding representation of user-item interaction information; Step 2.2: Use an automatic truncation strategy to extract the last m items of the user interaction sequence, concatenate them with the target item as input, fuse the information through a convolutional neural network, and aggregate model to obtain a short-term user interest representation; Step 2.3: Based on the sliding window strategy, short-term interest is used as an auxiliary metric. A representative user-item interaction subsequence is selected through an adaptive segmentation mechanism, and long-term user interest is modeled using Transformer. Step 2.4: Evaluate the credibility of continuous subsequences using a modeling scheme based on continuous subsequence length and user interest similarity, and apply the trained denoising model to denoise the sequence in the final stage using an adaptive denoising strategy. Step 2.5: Input the denoised user-item interaction information embedding representation into a common downstream recommendation model based on representation learning to obtain the interaction prediction result; Step 2.6: Use the correct interactions in the prediction results as positive samples and other interactions as negative samples, and use the BPR Loss function to reduce the representation bias between the predicted interactions and the correct interactions.
4. The method according to claim 3, characterized in that: In step 2.4, the adaptive denoising strategy is specifically as follows: First, a subsequence builder is used to divide the entire user interaction sequence into semantically similar original subsequences. Then, a dual judgment mechanism is constructed based on the length of the continuous noise subsequence and the cosine similarity between the continuous noise subsequence and the long-term interest. The noise subsequence is identified and detected through iteration, and finally a noise-free interaction sequence is generated.
5. The method according to claim 4, characterized in that: In step 3, Step 3.1: Input the training set data divided in Step 1 into the denoised sequence recommendation method and system based on continuous subsequence constructed in Step 2 to obtain the denoised user-item interaction information; Step 3.2: Input the denoised user-item interaction information obtained in Step 3.1 into the downstream sequence recommendation model to obtain the interaction score prediction result; Step 3.3: Input the interactive prediction results obtained in Step 3.2 into the BPR Loss function; Step 3.4: Minimize the loss function to train the model.
6. The method according to claim 5, characterized in that: In step 4, Step 4.1: Input the test set data divided in Step 1 into the denoised sequence recommendation model based on continuous subsequences constructed in Step 2; Step 4.2: Obtain the interactive prediction results.
7. The method according to claim 6, characterized in that: In step 5, For each user in the test set, the items are sorted in descending order based on the item interaction prediction scores obtained in step 4; items that the user has already interacted with are filtered to avoid duplicate recommendations, and the Top-K items are taken as the final recommendation sequence.
8. A denoising sequence recommendation system based on continuous subsequences, characterized in that: The system is used to execute the denoising sequence recommendation method based on continuous subsequences as described in any one of claims 1 to 7: The system includes the following preprocessing module, model building module, training module, and prediction and recommendation module; The preprocessing module acquires and preprocesses the user-item interaction dataset, dividing the dataset into a training set and a test set. The model building module constructs a denoised sequence recommendation model based on continuous subsequences; The training module uses the training set data divided by the preprocessing module to train the denoising sequence recommendation model based on continuous subsequences constructed by the model building module. The prediction and recommendation module uses the test set data divided by the preprocessing module to perform interactive prediction on the denoised sequence recommendation method model trained by the training module, and obtains the predicted interactive score; and generates a recommendation list based on the predicted interactive score.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium for storing computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the steps of the method according to any one of claims 1 to 7.