Recommendation method and device, electronic equipment and storage medium

By combining a diffusion denoising module and a dual analysis network, the problem of distinguishing the periodic characteristics of user behavior in sequence recommendation models is solved, thereby improving recommendation accuracy and the ability to model periodic preferences.

CN121256151AActive Publication Date: 2026-01-02SICHUAN UNIV
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202511832649.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-08
Publication Date
2026-01-02
Estimated Expiration
2045-12-08

AI Technical Summary

Technical Problem

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

Method used

A diffusion denoising module is used to combine the first and second coding features of the noise samples for denoising. User preference representations are fused through a dual analysis network. Fourier frequency band decomposition and aggregation modules are used to decouple periodic patterns and capture local and long-range order dependencies.

Benefits of technology

It improves the accuracy of sequence recommendation, achieves the unification of noise and multi-scale periodic preference modeling, and enhances the model's ability to model periodic preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121256151A_ABST
    Figure CN121256151A_ABST
Patent Text Reader

Abstract

The invention relates to the field of sequence recommendation, in particular to a recommendation method and device, electronic equipment and a storage medium, and the method comprises the steps: capturing a reverse denoising network which integrates two-way Mama to capture sequence long-range ordered dependence and a two-way self-attention mechanism to capture global context association; the method aims at generating a more robust user behavior sequence representation through signal reconstruction. The de-noised sequence representation is sent to a parallel double analysis structure, one Fourier analysis module adaptively decouples and aggregates a multi-scale periodic pattern through a learnable frequency band attention mechanism, and one time domain Transform encoder is used for modeling a dependency relationship in the sequence at the same time. The outputs of both are ultimately fused to generate a user preference representation. And the DCFRec is optimized through joint training, so that the robustness and recommendation precision of the model are improved.
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, and in particular, to a recommendation method and device, electronic equipment and a 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 periods superimposed. Different length periods 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, improving the recommendation accuracy.

[0005] In a first aspect, the embodiments of the present application provide a recommendation method, which comprises: obtaining a user interaction sequence sample and a corresponding item recommendation label; 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; 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; 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; The sequence recommendation model is trained according to the item recommendation probability vector and the item recommendation label corresponding to the user interaction sequence sample, so as to recommend items for the user based on the double analysis network and the prediction layer in the trained sequence recommendation model.

[0006] 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 encoded feature and the second encoded feature of the noise sample, and obtain a reconstructed embedding representation, including: Gaussian noise is added to the interaction embedding step by step to obtain a target noise sample at any time step; 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; The input representation of the denoising network is input into a bidirectional Mamba encoder in the denoising network to obtain a first encoded feature of the noise sample; The input representation of the denoising network is input into a bidirectional self-attention encoder in the denoising network to obtain a second encoded feature of the noise sample; The first encoded feature and the second encoded feature are fused to obtain a reconstructed embedding representation.

[0007] 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: 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; 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; The sequence embedding representation is modified according to the binary mask vector to obtain a target noise sample at the time step.

[0008] In a possible implementation, the reconstructed embedding representation is input into the double analysis network in the sequence recommendation model, so as 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, including: inputting 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; inputting 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; element-wise adding the first user preference representation and the second user preference representation to obtain a target user preference representation.

[0009] In a possible implementation, the 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 comprises: inputting the reconstructed embedding representation and a context vector of a first layer into a Fourier behavior pattern generation layer of the first layer in the Fourier band decomposition and aggregation module to obtain a multi-behavior pattern representation of the first layer; the context vector of the first layer is a first item representation in the reconstructed embedding representation; each behavior pattern vector in the multi-behavior pattern representation describes a user 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, determining a context vector of the layer according to a multi-behavior pattern representation output by a previous layer; and inputting the reconstructed embedding representation and the context vector of the layer into the Fourier behavior pattern generation layer to obtain a multi-behavior pattern representation of the layer; inputting the multi-behavior pattern representation output by the last layer into an aggregation module in the Fourier band decomposition and aggregation module to enhance a representation of each behavior pattern vector based on an interaction relationship between different behavior pattern vector sequences, to obtain a behavior pattern matrix; performing 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.

[0010] In a possible implementation, the 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 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 includes 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 is used to extract a periodic pattern; 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. 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; The multi-behavioral pattern representation of the layer is determined based on the second time-domain signal representation.

[0011] In one possible implementation, generating the respective frequency band masks based on the context vector includes: ; ; in, For multilayer perceptron generator, For context vectors, for 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.

[0012] Secondly, embodiments of this application also provide a recommended device, the device comprising: The acquisition module is used to acquire user interaction sequence samples and corresponding item recommendation tags; 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. 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; 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. The training module is 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 a dual analysis network and the prediction layer in the trained sequence recommendation model.

[0013] In a third aspect, an electronic device is provided, which includes a processor, a storage medium, and a bus. The storage medium stores machine readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium through the bus. The processor executes the machine readable instructions to perform the steps of the recommendation method according to any one of the first aspect.

[0014] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program. When the computer program is run by a processor, the steps of the recommendation method according to any one of the first aspect are performed.

[0015] The embodiments of the present application provide a recommendation method, device, electronic device, and storage medium. The method includes: inputting a corresponding interaction embedding of a user interaction sequence sample into a diffusion denoising module in a sequence recommendation model, to denoise a noise sample by combining a first encoding feature and a second encoding feature of the corresponding 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 an item preference evolution process of a user over time; and the second encoding feature is used to represent semantic association between each two items regardless of interaction time. The reconstructed embedding representation is input 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 target user preference representation is input into a prediction layer in the sequence recommendation model, to obtain an item recommendation probability vector corresponding to the user interaction sequence sample. The sequence recommendation model is trained according to the item recommendation probability vector corresponding to the user interaction sequence sample and an 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 beneficial effects of the present application are as follows: (1) A sequence recommendation model DCFRec based on the "denoising-analysis" architecture is proposed, which optimizes the denoising and periodic analysis of sequence representation cooperatively, and realizes the unification of noise and multi-scale periodic preference modeling for the first time.

[0016] (2) A context-aware frequency domain analysis module is designed, which dynamically adjusts the frequency band mask of Fourier transform to adaptively decouple the periodic patterns in different user behavior sequences, effectively improving the periodic preference modeling capability of the model. BRIEF DESCRIPTION OF DRAWINGS In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly introduced as follows. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.

[0017] Figure 1 A flowchart of a recommendation method provided by an embodiment of the present application is shown; Figure 2 A structural diagram of a sequence recommendation model provided by an embodiment of the present application is shown; Figure 3 A structural diagram of a recommendation device provided by an embodiment of the present application is shown; Figure 4 A structural diagram of an electronic device provided by an embodiment of the present application is shown. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of illustration and description, and do not limit the protection scope of the present application. In addition, it should be understood that the schematic drawings are not drawn according to the actual proportions. The flowchart shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can not be implemented in sequence, and the steps without logical context relationship can be reversed in sequence or implemented simultaneously. In addition, one or more other operations can be added to the flowchart or one or more operations can be removed from the flowchart under the guidance of the content of the present application.

[0019] In addition, the described embodiments are only some embodiments of the present application, rather than all embodiments. The components of the embodiments of the present application described and shown in the drawings herein can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.

[0020] In order to enable those skilled in the art to use the content of the present application, the following implementation is given in combination with a specific application scenario "sequence recommendation field". 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 the present application. Although the present application is mainly described in connection with the "sequence recommendation field", it should be understood that this is only an exemplary embodiment.

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

[0022] The following will describe in detail a recommendation method provided by the embodiments of the present application.

[0023] Referring to Figure 1 , it is a flowchart of a recommendation method provided by the embodiments of the present application, referring to Figure 2 , it is a structural diagram of a sequence recommendation model provided by the embodiments of the present application; in combination with Figure 1 and Figure 2 , the exemplary steps of the embodiments of the present application are described as follows: S101, obtaining a user interaction sequence sample and a corresponding item recommendation label.

[0024] In the present implementation, let the item set be , and the user set be . For any user , its historical interaction sequence is arranged in time sequence as ; wherein, is the user historical interaction sequence; , represents the item in the th interaction of the user , and is the length of the historical interaction sequence (which can also be understood as the historical interaction times of the user ). Given the historical interaction sequence of the user , the goal of sequence recommendation is to predict the next item The sequence recommendation task can be formalized as solving the following optimization problem as shown in equation (1): (1) ; where, is the probability of under the interaction sequence

[0025] However, the historical interaction sequences in real-world scenarios often contain accidental, non-intentional interactions, which will affect the model's learning of the user's true preferences as noise. Therefore, an ideal sequence recommendation model must be robust, i.e., its prediction ability should not be affected by the noise existing in the input sequence The historical interaction sequence is usually divided into multiple user interaction sequence samples by a prefix-based strategy, which can be formalized as shown in equation (2): (2) ; In the training phase, each sub-sequence is a prefix of the original sequence, which is used as the input of the model, i.e. is the user interaction sequence sample, is the prediction target. The item is regarded as the item recommendation label corresponding to the user interaction sequence sample. The condition ensures that each user interaction sequence sample has a minimum effective length. is the prefix-based division method.

[0026] In addition, the overall architecture of the sequence recommendation model (Diffusion Denoising and Context-aware Frequency-domain analysis for Sequential Recommendation, DCFRec) is shown in Figure 2 DCFRec is built on a unified architecture of "denoising-analysis", and its core is a diffusion denoising module (DDM), and the downstream is a parallel double analysis network. Specifically, the user interaction sequence sample is mapped by the embedding layer and sent to the DDM. The DDM iteratively generates a robust sequence representation ​​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.

[0027] 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.

[0028] 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: Step 1: Gradually add Gaussian noise to the interactive embedding to obtain the target noise sample at any time step.

[0029] 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: 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.

[0030] 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: (3); 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.

[0031] 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): (4); in It is standard Gaussian noise from random sampling. ,and , These are accumulated scheduling parameters. This is known as interactive embedding.

[0032] ii. generating a binary mask vector according to the added-noise item position; the binary mask vector contains an identification of whether to add noise to the embedding of each item; the added-noise item position is selected from all item positions corresponding to the sequence embedding representation according to a preset proportion.

[0033] In the embodiments of the present application, in order to make the denoising task more challenging and focus on restoring the core preferences of users, an item-level mask mechanism is introduced. Before the start of training, a certain preset proportion of item positions are randomly selected from all item positions corresponding to the sequence embedding representation , and only the item embeddings of these selected positions are added with noise. For this purpose, an initial item-level binary mask vector is generated. The binary mask vector is expanded into a target binary mask matrix with the same dimension as the interaction embedding. If the th item is selected, all elements in the th row of the binary mask matrix are 1 (indicating that noise is added to the item embedding corresponding to the item position, i.e., the th item embedding), otherwise 0.

[0034] iii. correcting the sequence embedding representation according to the binary mask vector to obtain the target noise sample at the time step.

[0035] In the embodiments of the present application, the mask-based noise addition process is corrected as shown in equation (5): (5); wherein is the target noise sample, which includes the noise-containing embedding representation vectors of each item. .

[0036] Further, in the reverse denoising process, the core of the DDM is to train a special denoising network , which can predict the original noise-free sequence from the noise-containing sequence at any time step . A single-step prediction target is used to ensure training efficiency while forcing the network to learn to cope with all noise levels to enhance its general denoising ability.

[0037] Specifically, the denoising network aims to give the noise-containing sequence at any time step , the corresponding time step embedding and the relative position encoding In this case, the original noise-free sequence is predicted in a single step . The overall function of the network can be summarized by equation (6): (6); where the relative position encoding is introduced to more effectively model the relative order and distance relationships between items.

[0038] To achieve the above functions, the internal architecture of the denoising network is designed as a hybrid network combining bidirectional Mamba and bidirectional self-attention to take advantage of the complementary capabilities of the two mechanisms in sequence modeling. The input representation of the denoising network is formed by element-wise addition of three parts of information: the noisy sequence , the embedding of the time step , and the relative position encoding of the sequence. The fused input representation is then input in parallel to two different encoder branches: one is a bidirectional Mamba-based encoder that is based on a state-space model and is good at capturing long-range, ordered dependencies; the other is a bidirectional self-attention-based encoder designed to capture global contextual associations in items that are independent of position. Therefore, the first encoding feature is used to represent the evolution of user's item preference over time; the second encoding feature is used to represent the semantic association between each two items independent of interaction time. Finally, the outputs of the two branches are fused by element-wise addition to form the final reconstructed embedding representation .

[0039] Specifically, the process of denoising using the denoising network refers to the following steps two to five: Step two, fuse the noise sample, the time step embedding corresponding to the time step, and the relative position encoding corresponding to the noise sample to obtain the input representation of the denoising network; the relative position encoding includes the position information of each item in the noise sample; the denoising network is included in the diffusion denoising module; In the embodiments of the present application, the noise sample, the time step embedding corresponding to the time step, and the position encoding corresponding to the noise sample are substituted into the following formula to obtain the input representation of the denoising network . .

[0040] ; wherein is the time step embedding corresponding to the time step , Encode the position corresponding to the noise sample.

[0041] In addition, the generation of the time step embedding adopts a two-stage process, as it is difficult to learn effectively by directly inputting the integer time step into a multi-layer perceptron (MLP), we follow the standard practice and first map the scalar time step into a multi-frequency time vector by a sinusoidal position encoding: (7). where is the embedding dimension index, , . Subsequently, this time vector is transformed by a network composed of two layers of MLP and SiLU activation function to obtain the final time step embedding .

[0042] Step three, input the input representation of the denoising network into the bidirectional Mamba encoder in the denoising network to obtain the first encoding feature of the noise sample.

[0043] In the embodiments of the present application, the input representation of the denoising network is input into the bidirectional Mamba encoder in the denoising network to obtain the first encoding feature of the noise sample as formula (8.1) as follows: (8.1). wherein the bidirectional Mamba encoder is composed of a forward Mamba block and a backward Mamba block.

[0044] Step four, input the input representation of the denoising network into the bidirectional self-attention encoder in the denoising network to obtain the second encoding feature of the noise sample.

[0045] In the embodiments of the present application, the input representation of the denoising network is input into the bidirectional self-attention encoder in the denoising network to obtain the second encoding feature of the noise sample as formula (8.2) as follows: (8.2). wherein the bidirectional self-attention encoder is stacked by a standard BERT type Transformer block.

[0046] Step five, fuse the first encoding feature and the second encoding feature to obtain a reconstruction embedding representation.

[0047] In the embodiments of the present application, ; Further, the final output of the DDM module is the reconstructed embedding representation , which is taken as the input of the Transformer encoder and the Fourier band decomposition and aggregation module in the downstream dual analysis network.

[0048] S103, input the reconstructed embedding representation into the dual analysis network in 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 a target user preference representation.

[0049] In the embodiments of the present application, 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. Specifically, the detailed processing process of the dual analysis network is as follows: Step one, 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.

[0050] In the embodiments of the present application, in order to deeply mine the complex periodic patterns in user behavior and at the same time pay attention to the recent preferences, a Fourier band decomposition and aggregation module (FBDAM) is designed (as shown on the right side of Figure 2 ). Unlike the method of simply performing time-frequency conversion or using a static filter, this module introduces a dynamic band generator which uses the overall semantics of the sequence and combines context information to adaptively generate multiple dynamic band masks, thereby performing soft decomposition, selection and emphasis on different frequency domain components of the user behavior sequence in the frequency domain, thereby realizing dynamic and fine-grained capture of multi-dimensional periodic patterns. Meanwhile, time decay weighted pooling and dynamic learning aggregation are combined to refine the fusion of these patterns to generate the final embedding that can comprehensively reflect the multi-dimensional behavior patterns of the user, i.e., the first user preference representation.

[0051] Specifically, the behavior patterns are processed in multiple layers. To realize the iterative extraction of user behavior patterns, FBDAM adopts the design of multiple Fourier behavior pattern generation layers. In each layer, a band mask is dynamically generated according to the context, and Fourier transform, inverse transform and time decay weighting are performed on the sequence. We define a single Fourier behavior pattern generation layer . This layer encapsulates the dynamic band decomposition and time decay weighted pooling operation. The function receives the denoised sequence embedding and a context vector , and the output is behavior pattern vectors, which are defined as shown in equation (9): (9); each behavior pattern vector is dynamically generated by the layer according to the context a band mask dynamically generated , and the Fourier transform, inverse transform, time decay weighting and time weighted pooling of . Among them, ; is the number of frequency bands. We stack such Fourier behavior pattern generation layers. Let denote the behavior pattern vector output by the th Fourier behavior pattern generation layer of the layer.

[0052] Specifically, the detailed processing process of the Fourier band decomposition and aggregation module is as follows: 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 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 angle.

[0053] In the embodiments of the present application, for the first layer Fourier behavior pattern generation layer ( ), the context vector of the first layer is provided by the first item representation of the denoising sequence embedding , i.e., the reconstructed embedding representation, because the first behavior of the user often sets the keynote for the intention 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 as shown in formula (10): (10); wherein, is the multi-behavior pattern representation of the first layer.

[0054] ii. For each layer of the Fourier behavior pattern generation layer in the Fourier band decomposition and aggregation module except the first layer, determine the context vector of the layer according to 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.

[0055] In the embodiments of the present application, the multi-behavior pattern representation includes behavior pattern vectors. Including for subsequent Fourier behavior pattern generation layers ( ), the context vector of which 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): (11); 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.

[0056] 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.

[0057] 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: (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.

[0058] 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): (12); in, is an imaginary unit. is the initial frequency domain signal representation in the th embedding dimension. th component.

[0059] (2) generating each frequency band mask according to the context vector; each frequency band mask is used to extract a periodic pattern.

[0060] In the embodiments of the present application, the MLP maps the context vector to a logits matrix . To match the dimension of the one-sided spectrum, we intercept the first items of each row of the matrix , and normalize it by the Softmax function to obtain the final soft mask : (13). where is the logits vector of the th frequency band mask, the context vector representing the user's interactive behavior. This context vector enables the frequency band division to be adaptively adjusted according to the user's current interactive behavior. is a multi-layer perceptron generator, is the logits vector of the th frequency band mask in the th embedding dimension, is the number of items in the user interaction sequence sample, is the number of frequency bands, is the th frequency band mask.

[0061] (3) determining the target frequency domain signal representation of each embedding dimension under each frequency band according to each frequency band mask and the frequency domain signal representation under each embedding dimension.

[0062] In the embodiments of the present application, the generated frequency band masks will act on the one-sided spectrum after Fourier transform, and through element-by-element multiplication, different frequency components in each frequency band will be soft selected and emphasized, so as to obtain the weighted frequency components in each frequency band , as shown in equation (14): (14). where represents the one-sided spectrum of the FFT result. is the target frequency domain signal representation of the th embedding dimension under the th frequency band.

[0063] Here, since the input signal is real, its Fourier transform result has conjugate symmetry, which means that the second half of the spectrum is redundant. Therefore, we only operate on the single-sided spectrum of the first half, i.e., by truncating to obtain its first frequency points.

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

[0065] In the embodiments of the present application, for each , we first restore it to a complete spectrum with length by using conjugate symmetry. Then, we convert it back to the time domain by inverse fast Fourier transform (IFFT) to obtain the corresponding time domain behavior vector sequence , is the second time domain signal representation of the th embedding dimension under the th frequency band. As shown in equation (15): (15); wherein is the time domain signal value of the th item in the second time domain signal representation of the th embedding dimension under the th frequency band.

[0066] Here, the combinations of all embedding dimensions are combined to obtain the behavior vector sequence under each frequency band. These behavior vector sequences describe the user's behavior patterns from different periodicity angles. includes the time domain signal values of each item at each embedding dimension under the th frequency band.

[0067] (5) determining the multi-behavior pattern representation of the layer according to the second time domain signal representation.

[0068] In the embodiments of the present application, time decay weighted pooling. This step aims to aggregate the time domain behavior vector sequences decomposed in the last step into single behavior pattern vectors This process employs a content-aware attention pooling mechanism and incorporates a learnable time decay bias to highlight the importance of recent user behavior.

[0069] 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. : (16); in, , For decay vector 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 Middle A weighted behavior vector for each time step.

[0070] 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. : (17); 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. : (18); By this operation, we generate a behavior pattern vector for each frequency band that can represent its core pattern and dynamically focus on important time steps , this behavior pattern vector, together, constitutes the multi-behavior pattern representation of the user in the current Fourier processing layer .

[0071] iii. input the multi-behavior pattern representation output by the last layer into the aggregation module in the Fourier frequency 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, and obtain a behavior pattern matrix.

[0072] In the embodiments of the present application, dynamic enhancement aggregation. The multi-behavior pattern representation output by the Fourier behavior pattern generation layer will enter the aggregation module for processing. This module dynamically models the interaction relationship between these different behavior patterns through a self-attention mechanism, and enhances the representation of each other to obtain an enhanced behavior pattern matrix : (19); wherein, is a learnable temperature coefficient for adjusting the sharpness of the attention distribution, and in the formula is the transpose.

[0073] iv. average pooling each behavior pattern vector in the behavior pattern matrix to obtain a first user preference representation corresponding to the reconstruction embedding representation.

[0074] In the embodiments of the present application, finally, by average pooling the enhanced behavior pattern vectors, they are aggregated into a single final representation that can represent the user's comprehensive periodic preference (i.e. the first user preference representation) : (20); wherein, is the th behavior pattern vector in .

[0075] Step two, input the reconstruction embedding representation into the Transformer encoder in the double analysis network to obtain a second user preference representation corresponding to the reconstruction embedding representation.

[0076] In the embodiments of the present application, in order to capture the local and long-range sequential dependencies among items in the sequence, we adopt a Transformer encoder to process the denoised sequence representation after the diffusion denoising module . The Transformer encoder consists of stacked identical layers, each of which contains a multi-head self-attention sublayer and a feed-forward network sublayer, each of which is followed by a residual connection and layer normalization. For each layer of the encoder , given an input , the output is shown in equation (21): (21); where the input of the first layer ( ) is the denoised sequence representation after the diffusion denoising module . The final output sequence representation of the Transformer encoder is . We extract the representation of the last item from as the global context representation (i.e., the second user preference representation), denoted as .

[0077] Step three, element-wise addition of the first user preference representation and the second user preference representation to obtain the target user preference representation.

[0078] In the embodiments of the present application, in order to make full use of the complementarity between the multi-behavior final aggregation representation output by the Fourier band decomposition and aggregation module and the global representation output by the Transformer encoder, we element-wise add the two representations to obtain the final user unified representation (i.e., the target user preference representation) , as shown in equation (22): (22); S104, input the target user preference representation into the prediction layer in the sequence recommendation model to obtain an item recommendation probability vector corresponding to the user interaction sequence sample.

[0079] In the embodiments of the present application, through the interaction of the final target user preference representation and the global item embedding space, the preference scores for all candidate items in the item set are calculated, and the Softmax function is used to obtain the item recommendation probability vector on all items : (23); where the item recommendation probability vector recommendation probability of each item in the item set; is an item embedding matrix containing embedding vectors of all items in the item set . is an item embedding matrix containing embedding vectors of all items in the item set .

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

[0081] In the embodiments of the present application, in order to realize the joint training of "denoising-analysis", we design a multi-task optimization objective containing two core tasks . The objective is composed of the recommendation task loss of the main model and the reconstruction task loss of the diffusion denoising module. The end-to-end training process of the model aims to jointly minimize the two losses.

[0082] (1) recommendation loss . The training target of the recommendation task is to minimize the recommendation loss , which is used as the main supervision signal of the recommendation task to optimize the prediction ability of the sequence recommendation model.

[0083] We use the standard cross-entropy loss to measure the difference between the prediction of the sequence recommendation model and the real next interaction item. The loss function directly supervises the recommendation performance of the sequence recommendation model, and its calculation formula is shown in formula (24): (24); wherein, is the recommendation probability of the th item in the item recommendation probability vector . is the recommendation probability label of the th item. If the item recommendation label is the th item, the recommendation probability label of the th item is 1, otherwise it is 0.

[0084] (2) diffusion reconstruction loss . In order 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."

[0085] 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.

[0086] 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): (25); in, It is to reconstruct the embedded representation 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 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.

[0087] (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): (26).

[0088] in, for The weighting coefficients.

[0089] 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.

[0090] 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.

[0091] 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: The acquisition module 301 is used to acquire user interaction sequence samples and corresponding item recommendation tags; 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; 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; The input module 302 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; The training module 303 is 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 a dual analysis network and the prediction layer in the trained sequence recommendation model.

[0092] Here, the device can combine multiple periodic patterns in the user interaction sequence to make recommendations, improving recommendation accuracy.

[0093] As shown in Figure 4 The electronic device 400 provided by the embodiment of the present application 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 and the memory 402 communicate through the bus. The processor 401 executes the machine readable instructions to perform the steps of the above-mentioned recommendation method.

[0094] Specifically, the above-mentioned memory 402 and processor 401 can be general memory and processor, which are not specifically limited here. When the processor 401 runs the computer program stored in the memory 402, it can execute the above-mentioned recommendation method.

[0095] Corresponding to the above-mentioned recommendation method, the embodiment of the present application further provides a computer readable storage medium, which stores a computer program. When the computer program is run by a processor, it performs the steps of the above-mentioned recommendation method.

[0096] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the above-mentioned system and device can refer to the corresponding process in the method embodiment, which will not be described in detail in the present application. In the several embodiments provided by the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The above-mentioned device embodiments are only schematic, for example, the division of the modules is only a logical function division, and the actual implementation can be another division manner, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the shown or discussed mutual elements can be indirect coupling or communication connection through some communication interfaces, devices or modules, which can be electrical, mechanical or other forms.

[0097] The modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical units, i.e., may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.

[0098] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit.

[0099] If the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer readable storage medium executable by a processor. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk, and various program code storage media.

[0100] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A recommendation method, characterized in that, The method includes: Obtain user interaction sequence samples and corresponding item recommendation tags; The user interaction sequence samples are embedded into the diffusion denoising module of the input sequence recommendation model. The noise samples are denoised by combining the first and second coding features of the noise samples corresponding to the user interaction sequence samples, and a reconstructed embedding representation is obtained. The user interaction sequence samples are a sequence of items ordered by interaction time. The first coding feature is used to characterize the evolution 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 interaction time. The reconstructed embedding representation is input into the dual analysis network in the sequence recommendation model 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; 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 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.

2. The recommended method according to claim 1, characterized in that, The step of embedding the user interaction sequence samples into the diffusion denoising module of the input sequence recommendation model, by combining the first and second coding features of the noise samples corresponding to the user interaction sequence samples, completes the denoising of the noise samples to obtain the reconstructed embedding representation, including: Gaussian noise is gradually added to the interactive embedding to obtain the target noise sample at any time step; 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 the input representation of the denoising network; the relative position encoding includes the position information of each item in the noise sample; the diffusion denoising module includes a denoising network; The input representation of the denoising network is input into the bidirectional Mamba encoder in the denoising network to obtain the first encoded feature of the noise sample; The input representation of the denoising network is input into the bidirectional self-attention encoder in the denoising network to obtain the second encoded feature of the noise sample; The first coding feature and the second coding feature are fused to obtain the reconstructed embedding representation.

3. The recommended method according to claim 2, characterized in that, The step of progressively adding Gaussian noise to the interactive embedding to obtain the target noise sample at any time step includes: Gaussian noise is gradually added to the interactive embedding through a forward diffusion process to obtain the sequence embedding representation at any time step. A binary mask vector is generated 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; The sequence embedding representation is modified according to the binary mask vector to obtain the target noise sample at the time step.

4. The recommended method according to claim 1, characterized in that, 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: 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; 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; The first user preference representation and the second user preference representation are added element by element to obtain the target user preference representation.

5. The recommended method according to claim 4, characterized in that, 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: 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; 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. 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. 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.

6. The recommended method according to claim 5, characterized in that, 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: 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; Each frequency band mask is generated based on the context vector; each frequency band mask is used to extract a periodic pattern. 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. 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; The multi-behavioral pattern representation of the layer is determined based on the second time-domain signal representation.

7. The recommended method according to claim 6, characterized in that, The step of generating each frequency band mask based on the context vector includes: ; ; in, For multilayer perceptron generator, For context vectors, for 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.

8. A recommended device, characterized in that, The device includes: The acquisition module is used to acquire user interaction sequence samples and corresponding item recommendation tags; 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. 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; 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; 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.

9. An electronic device, characterized in that, include: The device includes 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 in operation, 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 one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the recommended method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Sequence recommendation method based on diffusion model and attention mechanism

    CN119691265A

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

    CN120541299A

  • Course resource recommendation method and device based on improved state space model, equipment and storage medium

    CN120744242A

  • Interest point recommendation method based on dynamic hierarchical attention fusion space-time network

    CN120780923A

  • Multi-modal sequence recommendation method based on double-gating hybrid expert model and Fourier noise reduction

    CN120804383A