A recommendation method and device, electronic equipment and storage medium

By using the diffusion denoising module and dual analysis network in the DCFRec model, the problem of distinguishing periodic features in sequence recommendation is solved, the recommendation accuracy and robustness are improved, and multi-scale periodic preference modeling is realized.

CN121256151BActive Publication Date: 2026-03-10SICHUAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing sequence recommendation models struggle to effectively distinguish between periodic features of varying lengths in user behavior, leading to reduced accuracy in recommendation results.

Method used

By combining a diffusion denoising module with a dual analysis network, a DCFRec model is proposed. Through denoising and periodic analysis, a bidirectional Mamba and bidirectional self-attention encoder are used to capture long-short-term dependencies, and periodic patterns are decoupled from the Fourier band decomposition and aggregation module.

Benefits of technology

This approach enables multi-scale periodic preference modeling in user interaction sequences, improving recommendation accuracy and robustness, effectively decoupling periodic features, and enhancing the accuracy of recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121256151B_ABST
    Figure CN121256151B_ABST
Patent Text Reader

Abstract

The present application relates to the field of sequence recommendation, and particularly relates to a recommendation method and device, electronic equipment and storage medium, the method generates a more robust user behavior sequence representation through signal reconstruction by a reverse denoising network which fuses a bidirectional Mamba to capture long-range ordered dependencies of sequences and a bidirectional self-attention mechanism to capture global context association. The denoised sequence representation is sent to a parallel double analysis structure, wherein a Fourier analysis module adaptively decouples and aggregates multi-scale periodic patterns through a learnable band attention mechanism, and a time domain Transformer encoder is used to model dependencies in the sequence at the same time. The outputs of the two are finally fused to generate a user preference representation. The DCFRec is optimized through joint training to improve the robustness and recommendation accuracy of the model.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of sequence recommendation, in particular to a recommendation method and device, electronic equipment and storage medium. BACKGROUND

[0002] Sequential Recommendation (SR) technology has shown great value and made significant progress in various online platforms by mining the evolution rules in user historical interaction sequences, dynamically predicting their next time preference.

[0003] However, user behavior often presents periodic characteristics of "day", "week", "month" and even longer cycles superimposed. Different length cycles are mixed in a sequence, overlapping with each other, and the model is difficult to distinguish these periodic characteristics in the sequence, reducing the accuracy of the recommendation result. SUMMARY

[0004] Therefore, the purpose of the present application is to provide a recommendation method, device, electronic equipment and storage medium, which can combine multiple periodic patterns in user interaction sequences for recommendation, and improve the recommendation accuracy.

[0005] In a first aspect, the embodiments of the present application provide a recommendation method, which comprises:

[0006] obtaining a user interaction sequence sample and a corresponding item recommendation label;

[0007] inputting the corresponding interaction of the user interaction sequence sample into a diffusion denoising module in a sequence recommendation model, to complete the denoising of the noise sample by combining the first encoding feature and the second encoding feature of the noise sample corresponding to the user interaction sequence sample, to obtain a reconstructed embedding representation; wherein the user interaction sequence sample is an item sequence sorted according to interaction time; the first encoding feature is used to represent the evolution process of user's item preference over time; the second encoding feature is used to represent the semantic association between each two items regardless of interaction time;

[0008] inputting the reconstructed embedding representation into a double analysis network in the sequence recommendation model to fuse the first user preference representation and the second user preference representation corresponding to the reconstructed embedding representation, to obtain a target user preference representation; the first user preference representation is used to represent a comprehensive preference representation combined with multiple periodic patterns; the second user preference representation is used to represent the local order dependence and long-range order dependence between items;

[0009] inputting the target user preference representation into a prediction layer in the sequence recommendation model to obtain an item recommendation probability vector corresponding to the user interaction sequence sample;

[0010] The sequence recommendation model is trained according to the item recommendation probability vector corresponding to the user interaction sequence sample and the item recommendation label, so as to recommend items for the user based on the double analysis network and the prediction layer in the trained sequence recommendation model.

[0011] In a possible implementation, the diffusion denoising module corresponding to the user interaction sequence sample is input into the sequence recommendation model, so as to complete denoising of the noise sample by combining the first encoding feature and the second encoding feature of the noise sample, and obtain a reconstructed embedding representation, including:

[0012] Gaussian noise is added to the interaction embedding step by step to obtain a target noise sample at any time step;

[0013] The noise sample, the time step embedding corresponding to the time step, and the relative position encoding corresponding to the noise sample are fused to obtain an input representation of the denoising network; the relative position encoding includes position information of each item in the noise sample; the diffusion denoising module includes a denoising network;

[0014] The input representation of the denoising network is input into a bidirectional Mamba encoder in the denoising network to obtain a first encoding feature of the noise sample;

[0015] The input representation of the denoising network is input into a bidirectional self-attention encoder in the denoising network to obtain a second encoding feature of the noise sample;

[0016] The first encoding feature and the second encoding feature are fused to obtain a reconstructed embedding representation.

[0017] In a possible implementation, the Gaussian noise is added to the interaction embedding step by step to obtain a target noise sample at any time step, including:

[0018] Gaussian noise is added to the interaction embedding step by step through a forward diffusion process to obtain a sequence embedding representation at any time step;

[0019] A binary mask vector is generated according to the item position to which noise is added; the binary mask vector includes an identifier of whether noise is added to each item embedding; the item position to which noise is added is selected from all item positions corresponding to the sequence embedding representation according to a preset proportion;

[0020] The sequence embedding representation is modified according to the binary mask vector to obtain a target noise sample at the time step.

[0021] In one possible implementation, the step of inputting the reconstructed embedding representation into the dual analysis network of the sequence recommendation model to fuse the reconstructed embedding representation corresponding to the first user preference representation and the second user preference representation to obtain the target user preference representation includes:

[0022] The reconstructed embedding representation is input into the Fourier band decomposition and aggregation module in the dual analysis network to obtain the first user preference representation corresponding to the reconstructed embedding representation;

[0023] The reconstructed embedding representation is input into the Transformer encoder in the dual analysis network to obtain the second user preference representation corresponding to the reconstructed embedding representation;

[0024] The first user preference representation and the second user preference representation are added element by element to obtain the target user preference representation.

[0025] In one possible implementation, the step of inputting the reconstructed embedding representation into the Fourier band decomposition and aggregation module in the dual analysis network to obtain the first user preference representation corresponding to the reconstructed embedding representation includes:

[0026] The reconstructed embedding representation and the context vector of the first layer are input into the Fourier behavior pattern generation layer of the first layer in the Fourier frequency band decomposition and aggregation module to obtain the multi-behavior pattern representation of the first layer; the context vector of the first layer is the first item representation in the reconstructed embedding representation; each behavior pattern vector in the multi-behavior pattern representation describes the user's behavior pattern from the corresponding periodic perspective;

[0027] For each Fourier behavior pattern generation layer in the Fourier frequency band decomposition and aggregation module except for the first layer, the context vector of the layer is determined based on the multi-behavior pattern representation output by the previous layer; and the reconstructed embedding representation and the context vector of the layer are input into the Fourier behavior pattern generation layer to obtain the multi-behavior pattern representation of the layer.

[0028] The multi-behavioral pattern representation output from the last layer is input into the aggregation module in the Fourier frequency band decomposition and aggregation module to enhance the representation of each behavioral pattern vector based on the interaction relationship between different behavioral pattern vector sequences, thereby obtaining the behavioral pattern matrix.

[0029] The behavior pattern vectors in the behavior pattern matrix are averaged and pooled to obtain the first user preference representation corresponding to the reconstructed embedding representation.

[0030] In one possible implementation, the reconstructed embedding representation and the context vector of any layer are input into the Fourier behavior pattern generation layer of the layer according to the following steps to obtain the multi-behavior pattern representation of the layer:

[0031] The vectors in each embedding dimension of the reconstructed embedding representation are subjected to discrete Fourier transform to obtain the initial frequency domain signal representation in each embedding dimension; the reconstructed embedding representation includes the first time domain signal representation of each item in each embedding dimension;

[0032] Each frequency band mask is generated based on the context vector; each frequency band mask is used to extract a periodic pattern.

[0033] Based on the frequency domain signal representations of each frequency band mask and each embedding dimension, determine the target frequency domain signal representations of each embedding dimension in each frequency band.

[0034] Perform a fast inverse Fourier transform on the target frequency domain signal representation of each embedding dimension under each frequency band to obtain the second time domain signal representation of each embedding dimension under each frequency band;

[0035] The multi-behavioral pattern representation of the layer is determined based on the second time-domain signal representation.

[0036] In one possible implementation, generating the respective frequency band masks based on the context vector includes:

[0037] ;

[0038] ;

[0039] in, For multilayer perceptron generator, For context vectors, for The Middle The logits vector of a frequency band mask. The number of items in the user interaction sequence sample. For the number of frequency bands, For the first A frequency band mask.

[0040] Secondly, embodiments of this application also provide a recommended device, the device comprising:

[0041] The acquisition module is used to acquire user interaction sequence samples and corresponding item recommendation tags;

[0042] The input module is used to embed the user interaction sequence samples into the diffusion denoising module of the input sequence recommendation model. This is done by combining the first and second encoding features of the noise samples corresponding to the user interaction sequence samples to denoise the noise samples and obtain a reconstructed embedding representation. The user interaction sequence samples are item sequences ordered by interaction time. The first encoding feature characterizes the evolution of the user's item preferences over time. The second encoding feature characterizes the semantic association between each pair of items, independent of interaction time.

[0043] The input module is further configured to input the reconstructed embedding representation into the dual analysis network in the sequence recommendation model, so as to fuse the reconstructed embedding representation with the first user preference representation and the second user preference representation to obtain the target user preference representation; the first user preference representation is used to characterize the comprehensive preference representation that combines multiple periodic patterns; the second user preference representation is used to characterize the local order dependency and long-range order dependency between items;

[0044] The input module is further configured to input the target user preference representation into the prediction layer of the sequence recommendation model to obtain the item recommendation probability vector corresponding to the user interaction sequence sample;

[0045] The training module is used to train the sequence recommendation model based on the item recommendation probability vector and item recommendation label corresponding to the user interaction sequence sample, so as to make item recommendations for users based on the dual analysis network and the prediction layer in the trained sequence recommendation model.

[0046] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a storage medium, and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the recommended method as described in any of the first aspects.

[0047] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the recommended method as described in any of the first aspects.

[0048] This application provides a recommendation method, apparatus, electronic device, and storage medium. The method includes: embedding user interaction sequence samples into a diffusion denoising module in a sequence recommendation model to denoise the noise samples by combining a first encoding feature and a second encoding feature of the corresponding noise samples, thereby obtaining a reconstructed embedding representation; wherein the user interaction sequence samples are a sequence of items ordered according to interaction time; the first encoding feature is used to characterize the evolution of user item preferences over time; the second encoding feature is used to characterize the semantic association between each pair of items independent of interaction time; and the reconstructed embedding representation is input into a dual analysis network in the sequence recommendation model to process the reconstructed embedding. This involves fusing the first and second user preference representations to obtain the target user preference representation. The first user preference representation characterizes a comprehensive preference representation that incorporates multiple periodic patterns. The second user preference representation characterizes local and long-range order dependencies between items. The target user preference representation is input into the prediction layer of the sequence recommendation model to obtain the item recommendation probability vector corresponding to the user interaction sequence sample. The sequence recommendation model is trained based on the item recommendation probability vector corresponding to the user interaction sequence sample and the item recommendation label, and item recommendations are made for users based on the dual analysis network and the prediction layer in the trained sequence recommendation model. The beneficial effects of this application are:

[0049] (1) A sequence recommendation model DCFRec based on the “denoising-analysis” architecture is proposed. It achieves the first unification of noise and multi-scale periodic preference modeling by co-optimizing the denoising and periodicity analysis of sequence representation.

[0050] (2) A context-aware frequency domain analysis module was designed. This module dynamically adjusts the frequency band mask of the Fourier transform to adaptively decouple the periodic patterns in different user behavior sequences, effectively improving the model's ability to model periodic preferences. Attached Figure Description

[0051] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0052] Figure 1 A flowchart illustrating a recommended method provided in an embodiment of this application is shown;

[0053] Figure 2 This paper shows a schematic diagram of the structure of the sequence recommendation model provided in an embodiment of this application;

[0054] Figure 3 A schematic diagram of the structure of a recommended device provided in an embodiment of this application is shown;

[0055] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0057] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0058] To enable those skilled in the art to utilize the content of this application, and in conjunction with the specific application scenario of "sequence recommendation," the following implementation methods are provided. For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is primarily described in the context of "sequence recommendation," it should be understood that this is merely an exemplary embodiment.

[0059] It should be noted that the term "comprising" will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0060] The following is a detailed description of a recommended method provided by an embodiment of this application.

[0061] Reference Figure 1 The diagram shown is a flowchart illustrating a recommended method provided in an embodiment of this application. (Refer to...) Figure 2The above is a schematic diagram of the sequence recommendation model provided in the embodiments of this application; combined with Figure 1 and Figure 2 The exemplary steps of the embodiments of this application will be described below:

[0062] S101. Obtain user interaction sequence samples and corresponding item recommendation tags.

[0063] In this embodiment of the application, the items are set as follows: The user set is For any user Its historical interaction sequence is arranged chronologically as follows: ;in, For the user's historical interaction sequence; , Indicates user In the Items in this interaction The length of the historical interaction sequence (which can also be understood as the user's...) (Number of historical interactions). Given a user Historical interaction sequence The goal of sequence recommendation is to predict the next interactive item. The sequence recommendation task can be formalized as solving the following optimization problem, as shown in equation (1):

[0064] (1);

[0065] in, In the interaction sequence Down, for The probability of.

[0066] However, historical interaction sequences in real-world scenarios Sequence recommendation models often include accidental, unintentional interactions, which act as noise and can affect the model's learning of users' true preferences. Therefore, an ideal sequence recommendation model must be robust, meaning its predictive power should not be affected by the input sequence. The noise present in the sequence affects the process. A prefix-based strategy is typically used to extract the historical interaction sequence. The user interaction sequence samples are divided into multiple (subsequences, target items), and this process can be formalized as shown in Equation (2):

[0067] (2);

[0068] During the training phase, each subsequence These are all prefixes of the original sequence, which serve as inputs to the model. For user interaction sequence samples, For the predicted target. Item Item recommendation tags are considered as corresponding to user interaction sequence samples. Conditions This ensures that each user interaction sequence sample has a minimum effective length. This is a prefix-based partitioning method.

[0069] Furthermore, the overall architecture of the sequence recommendation model (Diffusion Denoising and Context-aware Frequency-domain analysis for Sequential Recommendation, DCFRec) is as follows: Figure 2 As shown, DCFRec is built on a unified "denoising-analysis" architecture, with a diffusion denoising module (DDM) at its core and a parallel dual-analysis network downstream. Specifically, user interaction sequence samples are mapped through the embedding layer and then fed into the DDM. The DDM iteratively generates a robust sequence representation by simulating a reverse denoising process. This representation is then fed into two parallel analysis branches simultaneously: a frequency domain analysis module (i.e., a Fourier band decomposition and aggregation module), responsible for decoupling and modeling the long-term, periodic components of user preferences; and a time domain analysis module (i.e., a Transformer encoder), which focuses on capturing local or global order dependencies from the denoised sequence. Finally, these two complementary representations, representing periodic and order-dependent preferences respectively, are fused and used to generate a probability distribution through a prediction layer. The entire model achieves synergy between denoising and analysis processes through end-to-end joint training.

[0070] S102. The user interaction sequence sample is embedded into the diffusion denoising module in the input sequence recommendation model to denoise the noise sample by combining the first and second coding features of the noise sample corresponding to the user interaction sequence sample, thereby obtaining the reconstructed embedding representation.

[0071] In this embodiment, to address the noise challenge in user interaction sequence samples and learn high-quality robust representations, we introduce a diffusion denoising module (DDM) (such as...). Figure 2(As shown on the left). Unlike traditional denoising methods that rely on passive regularization, DDM's core lies in utilizing the inverse denoising principle of the diffusion model to actively reconstruct the original sequence from the noisy sequence to learn its noise-invariant representation. To ensure inference efficiency, this module is only used during the training phase. Here, we treat the denoising task as a self-supervised regularization method during training, with the main goal of optimizing the parameters of the item embeddings to make them robust to noise. This characteristic is encoded in the embeddings themselves, so that even if DDM is removed during the inference phase, downstream modules can still benefit from these high-quality embedding representations. The inverse denoising process is performed by a hybrid architecture network, which leverages the complementary capabilities of bidirectional Mamba and bidirectional self-attention. Specifically, bidirectional Mamba, based on structured state-space models (SSMs), is responsible for capturing long-distance, ordered dependencies in the user sequence (such as interests evolving over time); while the bidirectional self-attention mechanism captures global contextual associations (such as semantic similarity) between any two items, independent of location. The user interaction sequence samples are item sequences ordered by interaction time. The specific processing is as follows:

[0072] Step 1: Gradually add Gaussian noise to the interactive embedding to obtain the target noise sample at any time step.

[0073] In this embodiment, a forward diffusion process is introduced to train the DDM. We define the interactive embedding as a matrix. It can be represented as ,in It is the first Each item 3D embedding vector, This refers to the number of items in the user interaction sequence sample (which can also be understood as the number of interactions corresponding to the user interaction sequence sample). Specifically, the process of progressively adding Gaussian noise to the interaction embedding to obtain the target noise sample at any time step is as follows:

[0074] i. Gaussian noise is gradually added to the interactive embedding through a forward diffusion process to obtain the sequence embedding representation at any time step.

[0075] In this application embodiment, the forward diffusion process is theoretically defined as a A step-by-step Markov chain, gradually adding tiny Gaussian noise in each step of the interactive embedding. We use... Indicates at time step Sequence embedding representation at time, Therefore, from arrive The single-step transition can be expressed as:

[0076] (3);

[0077] in, From Transferred to The probability distribution, It follows a Gaussian distribution. It is a preset variance scheduling table that controls the noise level at each step. In time step The amount of noise added at that time In time step Sequence embedding representation at time. It is an identity matrix.

[0078] However, during training, we utilize one of its important properties: no iterative computation is required. In each training step, we randomly sample a time step from a uniform distribution. And use reparameterization techniques directly from the raw data This time step is generated in one step. Noisy samples at time (i.e., sequence embedding representation):

[0079] (4);

[0080] in It is standard Gaussian noise from random sampling. ,and , These are accumulated scheduling parameters. This is known as interactive embedding.

[0081] ii. Generate a binary mask vector based on the position of the item with added noise; the binary mask vector contains an identifier indicating whether noise is added to the embedding of each item; the position of the item with added noise is selected from all the item positions corresponding to the sequence embedding representation according to a preset ratio.

[0082] In this embodiment, to make the denoising task more challenging and to focus on restoring the user's core preferences, we introduce an item-level masking mechanism. Before training begins, we randomly select a certain preset proportion from all item positions corresponding to the sequence embedding representation. We determine the item positions and add noise only to the item embeddings at these selected positions. To do this, we generate an initial item-level binary mask vector. The binary mask vector is expanded into a binary mask matrix of the target with the same dimension as the interactive embedding. Among them, if the first If each item is selected, then The All elements in a row are 1 (indicating that the item is embedded at the position of the item (i.e., the first element)). (Embedded items) add noise, otherwise 0.

[0083] iii. Correct the sequence embedding representation based on the binary mask vector to obtain the target noise sample at the time step.

[0084] In the embodiments of this application, the noise addition process using a mask is modified as shown in equation (5):

[0085] (5);

[0086] in, The target noise sample includes the noisy embedding vectors of each item. .

[0087] Furthermore, in the reverse denoising process, the core of DDM lies in training a dedicated denoising network. This enables it to start from any time step Noisy sequences In the process, the original noise-free sequence is predicted. We employ a single-step prediction target, which, while ensuring training efficiency, enhances the network's general denoising capabilities by forcing it to learn to cope with all noise levels.

[0088] Specifically, denoising networks Aimed at any time step Noisy sequences Corresponding time step embedding and relative position encoding In this case, the original noiseless sequence can be predicted in a single step. The network The overall function can be summarized by equation (6):

[0089] (6);

[0090] Among them, relative position encoding The introduction of this method aims to more effectively model the relative order and distance relationships between items.

[0091] To achieve the above functions, The internal architecture is designed as a hybrid network combining bidirectional Mamba and bidirectional self-attention to leverage the complementary capabilities of these two mechanisms in sequence modeling. (Denoising network) Input representation It is formed by adding and fusing three parts of information element by element: noisy sequence Time step Embedded Relative position encoding of sequences The fused input representation The inputs are fed in parallel into two distinct encoder branches: one is a bidirectional Mamba-based encoder, which leverages a state-space model and excels at capturing long-range, ordered dependencies; the other is a bidirectional self-attention encoder designed to capture location-independent global contextual relationships within items. Therefore, the first encoded feature characterizes the user's evolving item preferences over time; the second encoded feature characterizes the temporal-independent semantic relationships between each pair of items. Finally, the outputs of the two branches are fused element-wise to form the final reconstructed embedding representation. .

[0092] Specifically, the denoising process using a denoising network is described in steps two through five below:

[0093] Step 2: Fuse the noise sample, the time step embedding corresponding to the time step, and the relative position code corresponding to the noise sample to obtain the input representation of the denoising network; the relative position code includes the position information of each item in the noise sample; the diffusion denoising module includes a denoising network;

[0094] In this embodiment, the noise sample, the time step embedding corresponding to the time step, and the position code corresponding to the noise sample are substituted into the following formula to obtain the denoising network. Input representation .

[0095] ;

[0096] in, For time step Corresponding time step embedding, The location corresponding to the noise sample is encoded.

[0097] Additionally, time step embedding The generation adopts a two-stage process, since integer time steps are directly used. Inputting a multilayer perceptron (MLP) is difficult for it to learn effectively, so we follow standard practice and first encode the scalar using sinusoidal position encoding. Mapped to a multi-frequency time vector :

[0098] (7);

[0099] in, It is an embedded dimension index. , Subsequently, this time vector The final time-step embedding is then obtained by transforming the network through a two-layer MLP and SiLU activation function. .

[0100] Step 3: Input the input representation of the denoising network into the bidirectional Mamba encoder in the denoising network to obtain the first encoded feature of the noise sample.

[0101] In this embodiment, the input representation of the denoising network is input to the bidirectional Mamba encoder in the denoising network. The first coding feature of the noise sample is obtained. The following is an example of equation (8.1):

[0102] (8.1);

[0103] The bidirectional Mamba encoder consists of a forward Mamba block and a backward Mamba block.

[0104] Step 4: Input the input representation of the denoising network into the bidirectional self-attention encoder in the denoising network to obtain the second encoded feature of the noise sample.

[0105] In this embodiment, the input representation of the denoising network is input to the bidirectional self-attention encoder in the denoising network. The second coding feature of the noise sample is obtained. The following is an example of equation (8.2):

[0106] (8.2);

[0107] The bidirectional self-attention encoder is composed of stacked standard BERT-style Transformer blocks.

[0108] Step 5: Fuse the first coding feature and the second coding feature to obtain the reconstructed embedding representation.

[0109] In the embodiments of this application, ;

[0110] Furthermore, the final output of the DDM module is the reconstructed embedded representation. We use it as input to the Transformer encoder and Fourier band decomposition and aggregation module in the downstream dual analysis network.

[0111] S103. Input the reconstructed embedding representation into the dual analysis network in the sequence recommendation model to fuse the first user preference representation and the second user preference representation corresponding to the reconstructed embedding representation to obtain the target user preference representation.

[0112] In this embodiment, the first user preference representation is used to characterize a comprehensive preference representation that combines multiple periodic patterns; the second user preference representation is used to characterize local and long-range order dependencies between items. Specifically, the detailed processing procedure of the dual analysis network is as follows:

[0113] Step 1: Input the reconstructed embedding representation into the Fourier band decomposition and aggregation module in the dual analysis network to obtain the first user preference representation corresponding to the reconstructed embedding representation.

[0114] In this application's implementation, to deeply mine complex periodic patterns in user behavior while simultaneously focusing on their recent preferences, we designed a Fourier band decomposition and aggregation module (FBDAM) (e.g. Figure 2 (As shown on the right). Unlike simple time-domain to frequency-domain conversion or the use of static filters, this module introduces a dynamic frequency band generator. This generator adaptively generates multiple dynamic frequency band masks by utilizing the overall semantics of the sequence and incorporating contextual information. This allows for the soft decomposition, selection, and emphasis of different frequency components in the user behavior sequence within the frequency domain, thus achieving dynamic and fine-grained capture of multi-dimensional periodic patterns. Simultaneously, by combining time-decay weighted pooling with dynamic learning aggregation to refine the fusion of these patterns, a final embedding that comprehensively reflects the user's multi-dimensional behavioral patterns—the first user preference representation—is generated.

[0115] Specifically, behavioral patterns are processed in multiple layers. To achieve iterative extraction of user behavioral patterns, FBDAM employs a multi-layered Fourier behavioral pattern generation design. In each layer, a frequency band mask is dynamically generated based on the context, and the sequence undergoes Fourier transform, inverse transform, and time-attenuated weighting. We define a single Fourier behavioral pattern generation layer. This layer encapsulates dynamic frequency band decomposition and time-attenuated weighted pooling operations. The function receives the denoised sequence embedding. and a context vector Its output is A vector of behavioral patterns, defined as shown in equation (9):

[0116] (9);

[0117] Each behavior pattern vector It is determined by the layer based on the context. Dynamically generated band mask ,right It is obtained by performing Fourier transform, inverse transform, time-decay weighted average, and time-weighted pooling. ; This refers to the number of frequency bands. We stack... This is a Fourier behavior pattern generation layer. Let... Indicates the first The output of the layer Fourier behavior pattern generation layer A behavioral pattern vector.

[0118] Specifically, the detailed processing procedure of the Fourier frequency band decomposition and aggregation module is as follows:

[0119] i. Input the reconstructed embedding representation and the context vector of the first layer into the Fourier behavior pattern generation layer of the first layer in the Fourier frequency band decomposition and aggregation module to obtain the multi-behavior pattern representation of the first layer; the context vector of the first layer is the first item representation in the reconstructed embedding representation; each behavior pattern vector in the multi-behavior pattern representation describes the user's behavior pattern from the corresponding periodic perspective.

[0120] In this embodiment of the application, for the first layer of Fourier behavior pattern generation layer ( ), the context vector of the first layer The input from the FBDAM module itself, i.e., the denoised sequence embedding The first item representation (i.e., the reconstructed embedding representation) is provided because the user's first action often sets the tone for the intent of the entire sequence. Based on the context vector of the first layer, the output of the first layer Fourier behavior pattern generation layer is shown in Equation (10):

[0121] (10);

[0122] in, This represents the multi-behavior pattern of the first layer.

[0123] ii. For each Fourier behavior pattern generation layer in the Fourier frequency band decomposition and aggregation module except for the first layer, determine the context vector of the layer based on the multi-behavior pattern representation output by the previous layer; and input the reconstructed embedding representation and the context vector of the layer into the Fourier behavior pattern generation layer to obtain the multi-behavior pattern representation of the layer.

[0124] In the embodiments of this application, the multi-behavior pattern representation Each behavior pattern vector. This includes the behavior pattern generation layers for subsequent Fourier behavior patterns (...). ), its context vector The generation depends on the output of the previous Fourier behavior pattern generation layer. This mechanism allows modules to iteratively refine behavioral pattern representations. We first iteratively refine the output of the previous layer... The behavior pattern vectors are averaged and aggregated to obtain a single aggregated vector. Subsequently, this aggregated single vector As input, a context vector for that layer is generated through a multilayer perceptron (MLP), and based on this context vector... The output of the subsequent Fourier behavior pattern generation layer is shown in equation (11):

[0125] (11);

[0126] in, For the first Multi-behavioral pattern representation of layers. The first of the multi-behavior pattern representations output by the previous layer A behavioral pattern vector.

[0127] Ultimately, FBDAM outputs the result of the final Fourier behavior pattern generation layer, i.e., the multi-behavior pattern representation. ;in, This indicates the total number of Fourier behavioral pattern generation layers included in the Fourier frequency band decomposition and aggregation module. Multi-behavioral pattern representation. It will be used as input for subsequent modules.

[0128] Specifically, the reconstructed embedding representation and the context vector of any layer are input into the Fourier behavior pattern generation layer of the layer according to the following steps to obtain the multi-behavior pattern representation of the layer:

[0129] (1) Perform discrete Fourier transform on the vectors in each embedding dimension of the reconstructed embedding representation to obtain the initial frequency domain signal representation in each embedding dimension; the reconstructed embedding representation includes the first time domain signal representation of each item in each embedding dimension.

[0130] In this embodiment of the application, the reconstructed embedded representation is... Perform a Fast Fourier Transform (FFT) on each embedding dimension. For Each embedding dimension in , No. The first time-domain signal representation corresponding to each embedded dimension In the Initial frequency domain signal representation under each embedding dimension The Each component is calculated using the Discrete Fourier Transform (DFT) formula (12):

[0131] (12);

[0132] in, It is the imaginary unit. For the first In the initial frequency domain signal representation under the embedding dimension, the first... Each component.

[0133] (2) Generate each frequency band mask based on the context vector; each frequency band mask is used to extract a periodic pattern.

[0134] In this embodiment of the application, the MLP will use the context vector Mapped to a logits matrix To match the dimension of a single-sided spectrum, we truncate the matrix. The first line of each row The terms are then normalized using the Softmax function to obtain the final soft mask. :

[0135] (13);

[0136] in, It is the first The logits vector of a frequency band mask. A context vector representing user interaction behavior. This context vector allows the frequency band allocation to be adaptively adjusted based on the user's current interaction behavior. For multilayer perceptron generator, for The Middle The logits vector of a frequency band mask. The number of items in the user interaction sequence sample. For the number of frequency bands, For the first A frequency band mask.

[0137] (3) Determine the target frequency domain signal representation for each embedding dimension in each frequency band based on the frequency band mask and the frequency domain signal representation for each embedding dimension.

[0138] In the embodiments of this application, the generated Each frequency band mask is applied to the single-sided spectrum after the Fourier transform. By multiplying element-wise, different frequency components are softly selected and emphasized, thus obtaining the weighted frequency components of each frequency band. As shown in equation (14):

[0139] (14);

[0140] in, This represents the one-sided spectrum of the FFT result. For the first The first frequency band The target frequency domain signal is represented by an embedded dimension.

[0141] Here, due to the input signal For a real number, its Fourier transform result It possesses conjugate symmetry, which means that the latter half of the spectrum is redundant. Therefore, we only operate on the first half of the spectrum, i.e., by truncating it. To obtain its former One frequency point.

[0142] (4) Perform fast inverse Fourier transform on the target frequency domain signal representation of each embedding dimension under each frequency band to obtain the second time domain signal representation of each embedding dimension under each frequency band.

[0143] In the embodiments of this application, for each We first use conjugate symmetry to restore it to a length of... Full spectrum Subsequently, it is transformed back to the time domain using Inverse Fast Fourier Transform (IFFT) to obtain the corresponding time-domain action vector sequence. , For the first The first frequency band The second time-domain signal representation with an embedded dimension, as shown in Equation (15):

[0144] (15);

[0145] in, For the first The first frequency band In the second time-domain signal representation of the embedding dimension, the first... The time-domain signal value of an item.

[0146] Here, all embedded dimensions are... of Combining these, we obtain the behavior vector sequence for each frequency band. These behavioral vector sequences describe user behavior patterns from different periodic perspectives. Including the first The time-domain signal values ​​of each item in each embedding dimension under each frequency band.

[0147] (5) Determine the multi-behavior mode representation of the layer based on the second time-domain signal representation.

[0148] In this embodiment, time-decay weighted pooling is used. This step aims to decompose the pooling process from the previous step. Group time-domain behavior vector sequence They are aggregated separately into A single behavioral pattern vector This process employs a content-aware attention pooling mechanism and incorporates a learnable time decay bias to highlight the importance of recent user behavior.

[0149] First, in order to introduce an inductive bias that favors recent behavior, we perform a certain inductive bias on each set of behavioral sequences. Preliminary time weighting was performed, among which... In order to be with the first The time-domain behavior vector sequence corresponding to each frequency band mask The first time step's temporal signal vector contains the temporal signal values ​​of the first item across all embedding dimensions. We define two learnable parameters: a time decay vector... Its initial value is set to a sequence that decreases linearly from 1 to 0; and a scalar scaling factor. The initial value of these two parameters is 1. During training, the model can freely adjust these two parameters. We multiply them to obtain the weights, which are then applied to each vector in the sequence to obtain a weighted sequence of action vectors. :

[0150] (16);

[0151] in, , For decay vector The Middle One element, For the first The first frequency band The time-domain signal vector of an item, In order to be with the first The weighted behavior vector sequence corresponding to each frequency band mask The Middle A weighted behavior vector for each time step.

[0152] Subsequently, we based our weighted sequence of action vectors The content is used to generate attention scores. Specifically, we calculate the attention score for each time step. Behavior vectors exist The average value across each embedding dimension is used as the importance score for that time step. The scores at all time steps are then normalized using the Softmax function to obtain the final attention weight vector. :

[0153] (17);

[0154] Finally, this set of content-aware attention weight vectors is used For the sequence after preliminary time weighting We perform a weighted summation to obtain the final behavior pattern vector. :

[0155] (18);

[0156] Through this operation, we generate a behavioral pattern vector for each frequency band that represents its core mode and dynamically focuses on important time steps. ,this These behavioral pattern vectors together form the user's multi-behavioral pattern representation in the current Fourier processing layer. .

[0157] iii. Input the multi-behavioral pattern representation output from the last layer into the aggregation module in the Fourier frequency band decomposition and aggregation module to enhance the representation of each behavioral pattern vector based on the interaction relationship between different behavioral pattern vector sequences, and obtain the behavioral pattern matrix.

[0158] In this embodiment, aggregation is dynamically enhanced. The multi-behavioral pattern representation output by the Fourier behavioral pattern generation layer is... The data will then be processed in the aggregation module. This module uses a self-attention mechanism to dynamically model the interaction relationships between these different behavioral patterns and mutually enhance their representations, resulting in an enhanced behavioral pattern matrix. :

[0159] (19);

[0160] in, It is a learnable temperature coefficient used to adjust the sharpness of attention distribution, in the formula... This is a transpose.

[0161] iv. Perform average pooling on each behavior pattern vector in the behavior pattern matrix to obtain the first user preference representation corresponding to the reconstructed embedding representation.

[0162] In this embodiment of the application, the final step is to enhance the... The behavioral pattern vectors are averaged and pooled to form a single final representation that can represent the user's comprehensive periodic preferences (i.e., the first user preference representation). :

[0163] (20);

[0164] in, for The Middle A behavioral pattern vector.

[0165] Step 2: Input the reconstructed embedding representation into the Transformer encoder in the dual analysis network to obtain the second user preference representation corresponding to the reconstructed embedding representation.

[0166] In this embodiment, to capture local and long-range order dependencies between items in the sequence, we employ a Transformer encoder to process the sequence representation after denoising by the diffusion denoising module. The Transformer encoder is composed of... The encoder consists of stacked identical layers, each containing a multi-head self-attention sublayer and a feedforward network sublayer, followed by residual connections and layer normalization. For each layer of the encoder... Given input The output is shown in equation (21):

[0167] (twenty one);

[0168] Among them, the first layer ( ) input The sequence representation after denoising by the diffusion denoising module The final output sequence of the Transformer encoder is represented as follows: We started from... Extract the representation of the last item as the global context representation (i.e., the second user preference representation), denoted as . .

[0169] Step 3: Add the first user preference representation and the second user preference representation element by element to obtain the target user preference representation.

[0170] In this embodiment of the application, in order to fully utilize the multi-behavior final aggregated representation output by the Fourier band decomposition and aggregation module... and the global representation output by the Transformer encoder Based on the complementarity between the two representations, we add them element-wise to obtain the final unified user representation (i.e., the target user preference representation). As shown in equation (22):

[0171] (twenty two);

[0172] S104. Input the target user preference representation into the prediction layer of the sequence recommendation model to obtain the item recommendation probability vector corresponding to the user interaction sequence sample.

[0173] In this application embodiment, the final target user preference is represented. The interaction with the global item embedding space is used to calculate preference scores for all candidate items in the item set, and the Softmax function is used to obtain the item recommendation probability vector for all items. :

[0174] (twenty three);

[0175] Among them, the item recommendation probability vector This includes the recommendation probability of each item in the item set; It is an item embedding matrix, containing a set of items. The embedding vectors of all items in the dataset. For a collection of items The quantity of items in the text.

[0176] S105. Train the sequence recommendation model based on the item recommendation probability vector and item recommendation label corresponding to the user interaction sequence sample, and recommend items to the user based on the dual analysis network and the prediction layer in the trained sequence recommendation model.

[0177] In this application's implementation, to achieve joint training of "denoising-analysis", we designed a multi-task optimization objective that includes two core tasks. This objective is determined by the recommendation task loss of the main model. Reconstruction task loss of the diffusion denoising module The model's end-to-end training process aims to jointly minimize these two losses.

[0178] (1) Recommendation loss The training objective of the recommendation task is to minimize the recommendation loss. As the main supervisory signal for the recommendation task, it is used to optimize the predictive ability of the sequence recommendation model.

[0179] We use standard cross-entropy loss to measure the difference between the sequence recommendation model's prediction and the actual next interactive item. This loss function... The recommendation performance of the directly supervised sequence recommendation model is calculated using the formula shown in equation (24):

[0180] (twenty four);

[0181] in, Item recommendation probability vector The Middle The recommended probability of an item. For the first The recommended probability label for item 1. If the recommended label for item 1 is _____. The first item will be the first one. The recommendation probability label for an item is 1, otherwise it is 0.

[0182] (2) Diffusion reconstruction loss ( To effectively train the diffusion denoising module, we introduce a supervision signal to guide its denoising network. The learning process involves using negative log-likelihood (NLL) loss as the primary optimization objective. Notably, although real online behavior sequences may contain noise, we treat them as a relatively pure baseline during the training loop of the diffusion model. By learning how to recover this baseline sequence from added noise, the model acquires the general ability to distinguish between "real signals" and "noise."

[0183] Specifically, we instantiated a general form of discrete NLL loss. The output, i.e., the reconstructed embedding representation. First, by embedding the global item matrix... Multiply and apply the Softmax function to obtain the result at each position. The predicted probability distribution for all items. We will use the real items at each location in the user interaction sequence samples. This represents its corresponding one-hot encoded vector. . For the i-th real item in the user interaction sequence sample The one-hot encoded vector.

[0184] Subsequently, these predicted probability distributions are calculated in relation to the one-hot encoding of the actual original item ID. The cross-entropy between the model-predicted reconstructed sequence (in the form of item probabilities) and the user interaction sequence samples. The difference between them is calculated using the formula shown in equation (25):

[0185] (25);

[0186] in, It is to reconstruct the embedded representation The Middle The embedding vector of each item. It includes all Global item embedding matrix The transpose of . It is the initial binary mask vector at the item level defined during the forward diffusion process. The The global item embedding matrix contains the embedding vectors of all items. For a collection of items The quantity of all items in the game. When No. Sample of item-user interaction sequences at each location The Middle When items in the same location are identical, It is 1 if it is true, otherwise it is 0. For the i-th real item in the user interaction sequence sample The one-hot encoded vector.

[0187] (3) Final optimization objective Finally, we sum the two loss functions with weights to form the overall optimization objective of DCFRec, as shown in equation (26):

[0188] (26).

[0189] in, for The weighting coefficients.

[0190] Furthermore, based on the dual analysis network in the trained sequence recommendation model and the prediction layer, item recommendations are made for the user, including: obtaining the target user's historical interaction sequence; inputting the target user's historical interaction sequence into the dual analysis network in the trained sequence recommendation model to obtain the target user's predicted user preference representation; inputting the target user's predicted user preference representation into the prediction layer in the trained sequence recommendation model to obtain the target recommendation probability of each item in the item set; and recommending the item with the highest target recommendation probability to the target user.

[0191] Based on the same inventive concept, this application also provides a recommended device corresponding to the recommended method. Since the principle of the device in this application to solve the problem is similar to the above-mentioned recommended method in this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0192] Reference Figure 3 The diagram shown is a schematic representation of a recommendation device provided in an embodiment of this application. The recommendation device includes:

[0193] The acquisition module 301 is used to acquire user interaction sequence samples and corresponding item recommendation tags;

[0194] Input module 302 is used to embed the user interaction sequence samples into the diffusion denoising module of the input sequence recommendation model, so as to complete the denoising of the noise samples by combining the first and second coding features of the noise samples corresponding to the user interaction sequence samples, and obtain the reconstructed embedding representation; wherein, the user interaction sequence samples are a sequence of items ordered according to the interaction time; the first coding feature is used to characterize the evolution process of the user's item preferences over time; the second coding feature is used to characterize the semantic association between each pair of items that is independent of the interaction time;

[0195] The input module 302 is further configured to input the reconstructed embedding representation into the dual analysis network in the sequence recommendation model, so as to fuse the reconstructed embedding representation with the first user preference representation and the second user preference representation to obtain the target user preference representation; the first user preference representation is used to characterize the comprehensive preference representation that combines multiple periodic patterns; the second user preference representation is used to characterize the local order dependency and long-range order dependency between items;

[0196] The input module 302 is further configured to input the target user preference representation into the prediction layer of the sequence recommendation model to obtain the item recommendation probability vector corresponding to the user interaction sequence sample;

[0197] The training module 303 is used to train the sequence recommendation model based on the item recommendation probability vector and item recommendation label corresponding to the user interaction sequence sample, so as to make item recommendations for users based on the dual analysis network and the prediction layer in the trained sequence recommendation model.

[0198] This device can combine multiple periodic patterns in the user interaction sequence to make recommendations, thereby improving the accuracy of recommendations.

[0199] like Figure 4 As shown in the embodiment of this application, an electronic device 400 includes a processor 401, a memory 402, and a bus. The memory 402 stores machine-readable instructions executable by the processor 401. When the electronic device is running, the processor 401 communicates with the memory 402 via the bus, and the processor 401 executes the machine-readable instructions to perform the steps of the recommended method described above.

[0200] Specifically, the memory 402 and processor 401 described above can be general-purpose memory and processor, without any specific limitations. When the processor 401 runs the computer program stored in the memory 402, it can execute the recommended method described above.

[0201] Corresponding to the above-recommended method, this application embodiment also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the above-recommended method.

[0202] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.

[0203] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0204] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0205] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0206] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A recommendation method characterized by comprising: The method comprises: obtaining a user interaction sequence sample and a corresponding item recommendation label; inputting a user interaction sequence sample corresponding interaction embedding into a diffusion denoising module in a sequence recommendation model to complete denoising of a noise sample corresponding to the user interaction sequence sample by combining a first encoding feature and a second encoding feature of the noise sample, to obtain a reconstructed embedding representation; wherein the user interaction sequence sample is an item sequence sorted according to interaction time; the first encoding feature is used to represent the evolution process of user's item preference over time; and the second encoding feature is used to represent the semantic association between each two items regardless of interaction time; inputting the reconstructed embedding representation into a double analysis network in the sequence recommendation model to fuse a first user preference representation and a second user preference representation corresponding to the reconstructed embedding representation, to obtain a target user preference representation; the first user preference representation is used to represent a comprehensive preference representation combined with multiple periodic patterns; and the second user preference representation is used to represent local order dependence and long-range order dependence between items; inputting the target user preference representation into a prediction layer in the sequence recommendation model to obtain an item recommendation probability vector corresponding to the user interaction sequence sample; model training is performed on the sequence recommendation model according to the item recommendation probability vector corresponding to the user interaction sequence sample and the item recommendation label, to recommend items for users based on the double analysis network and the prediction layer in the trained sequence recommendation model; wherein the inputting of the user interaction sequence sample corresponding interaction embedding into the diffusion denoising module in the sequence recommendation model to complete denoising of the noise sample by combining the first encoding feature and the second encoding feature of the noise sample corresponding to the user interaction sequence sample to obtain the reconstructed embedding representation comprises: adding Gaussian noise to the interaction embedding step by step to obtain a target noise sample at any time step; fusing the noise sample, a time step embedding corresponding to the time step, and a relative position encoding corresponding to the noise sample to obtain an input representation of a denoising network; the relative position encoding includes position information of each item in the noise sample; the diffusion denoising module includes the denoising network; inputting the input representation of the denoising network into a bidirectional Mamba encoder in the denoising network to obtain the first encoding feature of the noise sample; inputting the input representation of the denoising network into a bidirectional self-attention encoder in the denoising network to obtain the second encoding feature of the noise sample; and fusing the first encoding feature and the second encoding feature to obtain the reconstructed embedding representation. The double analysis network into which the reconstructed embedding representation is input to fuse the reconstructed embedding representation into a first user preference representation and a second user preference representation to obtain a target user preference representation, comprises: inputting the reconstructed embedding representation into a Fourier band decomposition and aggregation module in the double analysis network to obtain the first user preference representation corresponding to the reconstructed embedding representation; inputting the reconstructed embedding representation into a Transformer encoder in the double analysis network to obtain the second user preference representation corresponding to the reconstructed embedding representation; and performing element-by-element addition on the first user preference representation and the second user preference representation to obtain the target user preference representation. The Fourier band decomposition and aggregation module into which the reconstructed embedding representation is input to obtain the first user preference representation corresponding to the reconstructed embedding representation, comprises: inputting the reconstructed embedding representation and a first-layer context vector into a Fourier behavior pattern generation layer of a first layer of the Fourier band decomposition and aggregation module to obtain a multi-behavior pattern representation of the first layer; the first-layer context vector is a first item representation in the reconstructed embedding representation; each behavior pattern vector in the multi-behavior pattern representation describes a user's behavior pattern from a corresponding periodic angle; for a Fourier behavior pattern generation layer of each layer except the first layer in the Fourier band decomposition and aggregation module, a context vector of the layer is determined according to a multi-behavior pattern representation output by a previous layer; and the reconstructed embedding representation and the context vector of the layer are input into the Fourier behavior pattern generation layer to obtain a multi-behavior pattern representation of the layer; the multi-behavior pattern representation output by the last layer is input into an aggregation module in the Fourier band decomposition and aggregation module to enhance the representation of each behavior pattern vector based on the interaction relationship between different behavior pattern vector sequences to obtain a behavior pattern matrix; and each behavior pattern vector in the behavior pattern matrix is average-pooled to obtain the first user preference representation corresponding to the reconstructed embedding representation.

2. The recommendation method of claim 1, wherein, The step of adding Gaussian noise to the interaction embedding to obtain a target noise sample at any time step, comprises: The step of adding Gaussian noise to the interaction embedding through a forward diffusion process to obtain a sequence embedding representation at any time step; The step of generating a binary mask vector according to the position of the item to which noise is added, wherein the binary mask vector contains an identifier of whether noise is added to each item embedding; and the position of the item to which noise is added is selected from all item positions corresponding to the sequence embedding representation according to a preset proportion; The step of correcting the sequence embedding representation according to the binary mask vector to obtain the target noise sample at the time step.

3. The recommendation method of claim 1, wherein, The step of inputting the reconstructed embedding representation and the context vector of any layer into the Fourier behavior pattern generation layer of the layer to obtain the multi-behavior pattern representation of the layer, comprises: performing a discrete Fourier transform on the vectors in each embedding dimension in the reconstructed embedding representation to obtain an initial frequency domain signal representation in each embedding dimension; the reconstructed embedding representation comprising a first time domain signal representation of each item in each embedding dimension; generating a frequency band mask according to the context vector; each frequency band mask being used to extract a periodic pattern; determining a target frequency domain signal representation of each embedding dimension in each frequency band according to the frequency domain signal representation in each embedding dimension and each frequency band mask; performing an inverse fast Fourier transform on the target frequency domain signal representation of each embedding dimension in each frequency band to obtain a second time domain signal representation of each embedding dimension in each frequency band; determining a multi-behavior pattern representation of the layer according to the second time domain signal representation.

4. The recommendation method according to claim 3, characterized in that, The generating a frequency band mask according to the context vector comprises: ; ; wherein, generating a multilayer perceptron, for a context vector, for the first logits vector for the band mask, for a number of items in a user interaction sequence sample, for a number of bands, the first band mask.

5. A recommendation device characterized by comprising: The apparatus comprises: an acquisition module configured to acquire a user interaction sequence sample and a corresponding item recommendation label; an input module configured to input a user interaction sequence sample corresponding interaction embedding into a diffusion denoising module in a sequence recommendation model, to complete denoising of a noise sample by combining a first encoding feature and a second encoding feature of the noise sample, to obtain a reconstructed embedding representation; wherein the user interaction sequence sample is an item sequence sorted according to interaction time; the first encoding feature is used to represent the evolution of user's item preference over time; and the second encoding feature is used to represent the semantic association between each two items regardless of interaction time; the input module is further configured to input the reconstructed embedding representation into a dual analysis network in the sequence recommendation model, to fuse a first user preference representation and a second user preference representation corresponding to the reconstructed embedding representation, to obtain a target user preference representation; the first user preference representation is used to represent a comprehensive preference representation combined with multiple periodic patterns; and the second user preference representation is used to represent local order dependence and long-range order dependence between items; the input module is further configured to input the target user preference representation into a prediction layer in the sequence recommendation model, to obtain an item recommendation probability vector corresponding to the user interaction sequence sample; a training module configured to perform model training on the sequence recommendation model according to the item recommendation probability vector corresponding to the user interaction sequence sample and the item recommendation label, to perform item recommendation for a user based on the dual analysis network and the prediction layer in the trained sequence recommendation model. The input module is specifically configured to add Gaussian noise to the interaction embedding step by step to obtain a target noise sample at any time step; fuse the noise sample, a time step embedding corresponding to the time step, and a relative position encoding corresponding to the noise sample to obtain an input representation of a denoising network; the relative position encoding includes position information of each item in the noise sample; the diffusion denoising module includes the denoising network; input the input representation of the denoising network into a bidirectional Mamba encoder in the denoising network to obtain a first encoding feature of the noise sample; input the input representation of the denoising network into a bidirectional self-attention encoder in the denoising network to obtain a second encoding feature of the noise sample; and fuse the first encoding feature and the second encoding feature to obtain a reconstructed embedding representation. The input module is specifically configured to input the reconstructed embedding representation into a Fourier band decomposition and aggregation module in the dual analysis network to obtain a first user preference representation corresponding to the reconstructed embedding representation; input the reconstructed embedding representation into a Transformer encoder in the dual analysis network to obtain a second user preference representation corresponding to the reconstructed embedding representation; and element-wise add the first user preference representation and the second user preference representation to obtain a target user preference representation. The input module is specifically configured to input the reconstructed embedding representation and a first-layer context vector into a Fourier behavior pattern generation layer of a first layer in the Fourier band decomposition and aggregation module to obtain a multi-behavior pattern representation of the first layer; the first-layer context vector is a first item representation in the reconstructed embedding representation; each behavior pattern vector in the multi-behavior pattern representation describes a user's behavior pattern from a corresponding periodic angle; for a Fourier behavior pattern generation layer of each layer except the first layer in the Fourier band decomposition and aggregation module, a context vector of the layer is determined according to a multi-behavior pattern representation output by a previous layer; and the reconstructed embedding representation and the context vector of the layer are input into the Fourier behavior pattern generation layer to obtain a multi-behavior pattern representation of the layer; the multi-behavior pattern representation output by the last layer is input into an aggregation module in the Fourier band decomposition and aggregation module to enhance the representation of each behavior pattern vector based on an interaction relationship between different behavior pattern vector sequences to obtain a behavior pattern matrix; and each behavior pattern vector in the behavior pattern matrix is average-pooled to obtain a first user preference representation corresponding to the reconstructed embedding representation.

6. An electronic device, comprising: The processor, the storage medium, and the bus, the storage medium stores machine readable instructions executable by the processor, when the electronic device runs, the processor and the storage medium communicate through the bus, the processor executes the machine readable instructions to execute the steps of the recommendation method in any one of claims 1 to 4. The processor, the storage medium, and the bus, the storage medium stores machine readable instructions executable by the processor, when the electronic device runs, the processor and the storage medium communicate through the bus, the processor executes the machine readable instructions to execute the steps of the recommendation method in any one of claims 1 to 4.

7. A computer readable storage medium characterized by The computer readable storage medium stores a computer program, and the computer program is run by the processor to execute the steps of the recommendation method in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Adaptive time-frequency fusion sequence recommendation method based on Mama architecture

    CN120541299A

  • Audio data processing method and apparatus, electronic device, program product, and storage medium

    WO2024001646A1