Sequence recommendation method based on positive and negative feedback and logic rule fusion
By combining positive and negative feedback information and logical rules, using the Transformer model and logical rule module, the existing recommendation algorithms have solved the shortcomings in negative feedback processing and interpretability, and realized a more efficient and highly interpretable recommendation system.
Patent Information
- Application Number
- CN202510213540.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-02-26
AI Technical Summary
The existing recommendation algorithms are insufficient when processing negative feedback data, making it difficult for the model to accurately capture the user's real preferences and lack of explanatory nature, especially in the fields of medical care, finance, etc.
By combining the positive and negative feedback information and logical rules of user behavior, a deep learning model based on Transformer is adopted to capture the dynamic relationship between user behavior and feedback using self-attention and cross-attention mechanisms, and provide explanatory through the logical rule module.
It significantly improves the performance, interpretability and adaptability of the recommendation system, improves recommendation accuracy and user trust in recommendation results, and can dynamically adjust recommendation strategies to adapt to changes in user interests.
Smart Images

Figure CN120067449A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of personalized recommendation systems, and particularly to a sequential recommendation method based on the fusion of positive and negative feedback and logical rules. Background Art
[0002] Recommendation systems are important tools for solving the problem of information overload and are widely used in fields such as e-commerce, video platforms, and social media. Traditional recommendation algorithms mostly model based on positive feedback data (such as clicks, purchases), while paying insufficient attention to negative feedback data (such as skips, disinterest), resulting in the model being difficult to accurately capture users' true preferences. In addition, existing recommendation algorithms are mostly data-driven and lack sufficient interpretability. Especially in fields such as healthcare and finance, interpretability and transparency are crucial.
[0003] As an interpretable framework, logical rules can intuitively express the constraint relationships between users and items. However, combining logical rules with deep learning has the following challenges: (1) Difficulty in fusing logical rules with numerical calculations: Logical rules are usually expressed in boolean type and are incompatible with the continuous features of deep learning. (2) Insufficient dynamic adaptability: Most logical rules are static and difficult to adapt to the dynamic changes of users' interests. (3) Limited support for complex scenarios: Single rules are difficult to handle complex business logics and diverse user behaviors.
[0004] Therefore, how to effectively utilize positive and negative feedback information and fuse logical rules to construct a recommendation algorithm with both accuracy and interpretability has become an important research direction. Summary of the Invention
[0005] The purpose of the present invention is to overcome the deficiencies and defects of the prior art, and provide a sequential recommendation method based on the fusion of positive and negative feedback and logical rules. By combining the positive and negative feedback information of users' behaviors and logical rules, the performance, interpretability, and adaptability of the recommendation system are significantly improved.
[0006] A sequential recommendation method based on the fusion of positive and negative feedback and logical rules includes:
[0007] Dividing the behaviors in the collected user behavior data into positive feedback and negative feedback, and constructing feedback sequences according to the time order of users' behaviors, including positive feedback sequences and negative feedback sequences;
[0008] Processing the features of the user behavior sequence and the feedback sequence respectively through the input layer to obtain corresponding embedded features;
[0009] The self-attention mechanism of a deep learning model based on Transformer is used to process the input embedded features, capture the internal dependency features of the original user behavior sequence, and cross-correlate and model the positive and negative feedback sequences with the input user behavior sequence through the cross-attention mechanism to capture the dynamic relationship between user behavior and feedback;
[0010] Through the output layer, the intermediate features of the model are mapped to the preference scores of the user for the target item, and finally a list of scores of the user for all candidate items is output for recommendation ranking.
[0011] Among them, the loss function of the model is a comprehensive loss function, including Loss1 generated by the deep learning model and Loss2 generated by the logic rule module. By minimizing the comprehensive loss, the deep learning model and the logic rule module are coordinated and optimized, so that the model can learn the statistical features in the data while following the logic rules; a weight dynamic adjustment mechanism is adopted to dynamically adjust the weights of Loss1 and Loss2, so that the logic rules can adapt to the dynamic changes of user interests.
[0012] Among them, the logic rules are automatically mined from historical data through a decision tree method, and the Sigmoid function is used to fuzzify the logic rules to convert discrete rules into continuous values to adapt to the calculations of the deep learning model.
[0013] Among them, the logic rules include positive rules for judging that preset conditions are met, and negative rules for judging that the conditions are not met or are opposite. The positive rules and the negative rules respectively correspond to corresponding specific conditions, and each specific condition corresponds to a corresponding weight.
[0014] Among them, the positive feedback includes behaviors such as liking, purchasing, collecting, and having a relatively high score; the negative feedback includes behaviors such as skipping, being uninterested, having a relatively low score, or being clearly marked as dislike.
[0015] Among them, the features of the user behavior sequence and the feedback sequence are respectively processed through the input layer to obtain corresponding embedded features, which are to process the features of the user behavior sequence and the feedback sequence respectively through independent embedding layers, including:
[0016] Taking the original item features of the user behavior sequence / feedback sequence as the first branch, and taking the user features, item features, and time features as the second branch, and respectively performing vector representation through independent embedding layers to obtain two different implicit feature results; the two different implicit feature results are concatenated by columns and, after being linearly transformed, the corresponding implicit features, that is, the embedded features to be input into the deep learning model, are obtained.
[0017] Among them, the user features include the user's age, gender, region, and historical preferences; the item features include the product category, price, brand, and popularity.
[0018] Among them, the first branch includes the first embedding layer function φ, and the second branch includes the second embedding layer function ψ; the first embedding layer function φ extracts the implicit feature z i The expression is as follows:
[0019]
[0020] The second embedding layer function ψ extracts the implicit feature q i The expression is as follows:
[0021] q i = ψ(i i , u, t i ) = concat col (i i , u, t i )W ψ + b ψ , W ψ ∈R (j+l+k)×g , b ψ ∈R g ,
[0022] The implicit feature e obtained by concatenating the results of the two different implicit features by column i The expression is as follows:
[0023] e i = ω(z i , q i ) = concat col (z i , q i )W ω + b ω , W ω ∈R (g+d)×d , b ω ∈R d ;
[0024] i i , u, t i respectively represent the item feature, the user feature, and the time feature, x i represents the original item feature, represents the weight and offset of the first embedding layer function, W ψ , b ψ represents the weight and offset of the first embedding layer function, W ω , b ω represents the weight and offset of the concatenation function.
[0025] Among them, the deep learning model constructed based on Transformer includes at least one preprocessing module and an output module. The preprocessing module sequentially includes a multi-head attention module, a normalization module, and an FFN feed-forward network module from the input side to the output side. The multi-head attention module models the data of the user behavior sequence input by the embedding layer. The output of the preprocessing module is input to the output module after being normalized. The output module sequentially includes an output cross-attention module, an FFN-OUT network module, and a Sigmoid function from the input side to the output side. The cross-attention module models the normalized data output from the preprocessing module and the data of the feedback sequence input by the embedding layer. Sigmoid maps the input to between 0 and 1, and graph-computes the output scores Scores. The obtained scores Scores are combined with the true values to calculate the loss through the loss function Loss1, evaluate the quality of the model prediction results, and guide the update of the model parameters during the backpropagation process to optimize the model performance.
[0026] Among them, in the multi-head attention mechanism, the input sequence is linearly transformed to obtain queries, keys, and values, the dot product of the queries and keys is calculated, the attention weights are obtained through the softmax function, and then multiplied by the values to obtain the weighted output. By calculating multiple self-attention mechanisms in parallel, various dependencies at different positions of the input sequence can be captured.
[0027] The present invention significantly improves the performance, interpretability, and adaptability of the recommendation system by combining positive and negative feedback information and logical rules of user behavior. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a schematic flowchart of the sequence recommendation method based on the fusion of positive and negative feedback and logical rules of the present invention.
[0029] Figure 2 is a schematic diagram of the overall architecture of the model of the sequence recommendation method based on the fusion of positive and negative feedback and logical rules of the present invention.
[0030] Figure 3 is a schematic diagram of the architecture of the sequence feature fusion module of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0031] The following further elaborates on the present invention in detail with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0032] See Figure 1 As shown, a sequence recommendation method based on the fusion of positive and negative feedback and logical rules includes:
[0033] Divide the behaviors in the collected user behavior data into positive feedback and negative feedback, and construct feedback sequences according to the user behaviors and chronological order, including positive feedback sequences and negative feedback sequences;
[0034] Process the features of the user behavior sequence and the feedback sequence respectively through the input layer to obtain corresponding embedding features;
[0035] Use the self-attention mechanism of the deep learning model built based on Transformer to process the input embedding features, capture the internal dependency features of the original user behavior sequence, and perform cross-correlation modeling on the positive and negative feedback sequences and the input user behavior sequence through the cross-attention mechanism to capture the dynamic relationship between user behavior and feedback;
[0036] Through the output layer, map the intermediate features of the model to the preference scores of the user for the target item, and finally output the score list of the user for all candidate items for recommendation ranking.
[0037] In the embodiments of the present application, the data collection is to collect user behavior data through log data or third-party platform interfaces, which covers various types of behaviors such as clicks, purchases, skips, and dislikes.
[0038] When classifying feedback, the data is divided into positive feedback and negative feedback based on behavior characteristics. For example, positive feedback includes user clicks, purchases, collections, and high ratings, while negative feedback includes user skips, lack of interest, low ratings, or being explicitly marked as "dislike".
[0039] When constructing the time series, sort the positive and negative feedbacks into time series according to the chronological order of user behaviors for subsequent modeling.
[0040] In the embodiments of the present application, the process of processing the features of the user behavior sequence and the feedback sequence respectively through the input layer to obtain corresponding embedding features is to process the features of the user behavior sequence and the feedback sequence respectively through independent embedding layers, including:
[0041] Take the original item features of the user behavior sequence / feedback sequence as the first branch, and take the user features, item features, and time features as the second branch, and perform vector representation through independent embedding layers respectively to obtain two different implicit feature results; splice the two different implicit feature results column by column and perform linear transformation processing to obtain the corresponding implicit features, that is, the embedding features to be input into the deep learning model.
[0042] In the embodiments of the present application, in the feature extraction of the sequence through the input layer, the user features involved include the user's age, gender, region, historical preferences, etc., and the item features include product categories, prices, brands, popularity, etc.
[0043] Among them, when performing the embedded vector representation of the user behavior sequence, the discrete user behaviors are mapped to a continuous vector space through an embedding layer. For the embedded vector representations of the positive and negative feedback sequences, the positive and negative feedback sequences are processed separately through independent embedding layers.
[0044] Among them, the first branch includes a first embedding layer function φ, and the second branch includes a second embedding layer function ψ; the first embedding layer function φ extracts an implicit feature z i The expression of which is as follows:
[0045]
[0046] In the above formula, R I →R d , z i ∈R d ,
[0047] The second embedding layer function ψ extracts an implicit feature q i The expression of which is as follows:
[0048] q i = ψ(i i , u, t i ) = concat col (i i , u, t i )W ψ + b ψ , W ψ ∈R (j+l+k)×g , b ψ ∈R g ,
[0049] In the above formula, R j+l+k →R g ,
[0050] The implicit feature e obtained by concatenating the two different implicit feature results column by column i The expression of which is as follows:
[0051] e i = ω(z i , q i ) = concat col (z i , q i )W ω + b ω , W ω ∈R (g+d)×d , b ω ∈R d ;
[0052] In the above formula, R g+d →Rd ,
[0053] x i represents the original features of the item, i i , u, t i represent the item features, user features, and time features respectively, x i represents the original features of the item, represents the weights and biases of the first embedding layer function, W ψ , b ψ represents the weights and biases of the first embedding layer function, W ω , b ω represents the weights and biases of the concatenation function.
[0054] Specifically, see Figure 3 as shown. The i on the left 1 , i 2 ,..., i n represent the original features of the item (Item), and the group on the right containing a i , a u , a t represent the item features (Item Features), user features (User Features), and time features (Time Features) respectively.
[0055] The original item features i on the left 1 , i 2 ,..., i n are processed by item embedding (Item Embedding, ), and the item, user, and time features on the right are processed by another embedding (Embedding, ψ); the high-dimensional sparse original features are converted into low-dimensional dense vector representations. The item feature vector after embedding and the item, user, and time feature vectors are combined into a feature vector through a concatenation operation (Concat). The concatenated feature vector enters a linear layer (Linear, ω) for linear transformation; after linear transformation, the final embedded feature i' 1 , i' 2 ,..., i' n is obtained, and these features can be used for subsequent machine learning model training or prediction tasks.
[0056] In the embodiments of the present application, the deep learning model constructed based on Transformer includes at least one preprocessing module and an output module. The preprocessing module sequentially includes a multi-head attention module, a normalization module, and an FFN feed-forward network module from the input side to the output side; the multi-head attention module models the data of the user behavior sequence input by the embedding layer; the output of the preprocessing module is input to the output module after being normalized. The output module sequentially includes an output cross-attention module, an FFN-OUT network module, and a Sigmoid function from the input side to the output side. The cross-attention module models the normalized data output from the preprocessing module and the data of the feedback sequence input by the embedding layer. Sigmoid maps the input to between 0 and 1, and graph-computes the output scores Scores; the obtained scores Scores are combined with the true values to calculate the loss through the loss function Loss1, evaluate the quality of the model prediction results, and guide the update of the model parameters during the backpropagation process to optimize the model performance.
[0057] Among them, in the multi-head attention mechanism, the input sequence is linearly transformed to obtain queries, keys, and values, the dot product of the queries and keys is calculated, the attention weights are obtained through the softmax function, and then multiplied by the values to obtain the weighted output; by parallel computing multiple self-attention mechanisms, various dependencies at different positions of the input sequence can be captured.
[0058] In the present application, the internal dependencies of the input original behavior sequence can be captured through the self-attention mechanism, and the importance of each behavior in the input original behavior sequence can be measured. And the multi-head self-attention mechanism simultaneously focuses on different behavior patterns and extracts richer feature information.
[0059] Among them, the specific mathematical expression of the processing flow of the multi-head self-attention mechanism is as follows:
[0060]
[0061] In the proposed model, the symbols Q, K, and V are respectively used to represent the query vector set (queries), the key vector set (keys), and the value vector set (values). represents a set of learnable parameter matrices in the model. The symbol concatcol is used to represent the operation of performing vector concatenation column-wise (i.e., in the column-wise manner). In order to appropriately adjust the scale of the inner product, a scaling factor is introduced
[0062] In the embodiments of the present application, in the feed-forward neural network structure, all training parameters are shared across elements. The specific mathematical expression is as follows:
[0063]
[0064] In the model architecture presented by the present invention, W (1) ,W (2) ∈R d×d respectively represent the weight parameter matrices of two layers in a two-layer feed-forward network.
[0065] In the embodiment of the present application, in the output module, its cross-attention module cross-correlates and models the positive and negative feedback sequences with the input sequence to capture the dynamic relationship between user behavior and feedback. The parts in the positive and negative feedback that contribute more to the prediction of user preferences are highlighted through a weighting mechanism.
[0066] The specific calculation process of the cross-attention module is described in detail as follows:
[0067]
[0068] σ represents the Sigmoid activation function, W O ∈R d×1 and b O ∈R respectively represent the weight parameter matrix and its corresponding bias vector. Based on the above, a loss function for the negative feedback deep learning module can be constructed to further evaluate and optimize the performance of the model.
[0069]
[0070] In the embodiment of the present application, the logic rule module mines explicit logic rules from historical data using a decision tree, such as "age > 30 and category = electronic products". The Sigmoid function is used to fuzzify the rules and smooth the rule output values into continuous numerical values for easy combination with the deep learning model.
[0071]
[0072] Modeling using the sigmoid function, the variable x represents the specific value of a certain component in the feature vector of things, the parameter s is used to control the slope of the sigmoid function, which determines the steepness of the function curve, and the parameter v represents the median of the curve and at the same time corresponds to the comparison value set for a certain rule on this component. In a single match, the category with a higher matching degree is regarded as a more appropriate target recommendation result.
[0073] In the embodiment of the present application, such as Figure 3As shown, R+ and R- represent Positive Rules and Negative Rules respectively. R+ may be a positive rule used to determine whether certain conditions are met, while R- is a negative rule used to determine whether the conditions are not met or are the opposite. w1, wk, wm, w1, wk, wq represent weights. These weights (w1, wk, wm and w1, wk, wq) derived from R+ and R- represent the importance of each condition in the rule and are used to weight different conditions during the calculation process. R posconds represents the set of positive rule conditions, where C 11 , C 1k , C 1n are the specific conditions under the positive rule. R neqconds represents the set of negative rule conditions, where C 11 , C 1k , C 1q are the specific conditions under the negative rule.
[0074] In the embodiments of the present application, the conversion method from logical calculation to numerical calculation is shown in the following table.
[0075]
[0076] By dynamically adjusting the rule weights, the model can flexibly adapt to the influence of the rules according to the changes in the scenario.
[0077] In the embodiments of the present application, the output layer maps the intermediate features of the model to the preference scores of the user for the target item through a multi-layer fully connected network, and finally outputs a list of scores of the user for all candidate items for recommendation ranking.
[0078] Experimental verification
[0079] 1. Experimental dataset
[0080] E-commerce data: User purchase and browsing records.
[0081] Movie recommendation data: User ratings and viewing records.
[0082] 2. Evaluation metrics
[0083] Accuracy metrics: Such as HR, NDCG.
[0084] Diversity metrics: Evaluate the diversity of the recommendation results.
[0085] Interpretability metrics: User satisfaction and understanding of the recommendation results.
[0086] 3. Experimental settings
[0087] The comparison models include traditional collaborative filtering, sequence recommendation models based on deep learning, and models without integrating logical rules. Parameter tuning and ablation experiments are conducted to analyze the effects of the positive and negative feedback ratios and the weights of logical rules in the models.
[0088] 4. Experimental Results
[0089] The model of the present invention is superior to the comparison models in all evaluation metrics, especially showing significant advantages in negative feedback utilization and logical rule integration. The following table shows the comparison of experimental results with mainstream sequence recommendation models. Among them, PosNegRec++ is the model proposed by the method of the present invention.
[0090]
[0091] The technology of the embodiments of the present invention has the following beneficial effects:
[0092] 1. Improve recommendation accuracy
[0093] The introduction of negative feedback significantly improves the accuracy of user preference modeling and solves the problem of one-sidedness of positive feedback information. The self-attention and cross-attention mechanisms effectively capture the key features in user behavior and improve the prediction ability of user interests.
[0094] 2. Enhance system interpretability
[0095] The integration of logical rules provides an intuitive basis for explaining the recommendation results, which helps to improve users' trust in the recommendation results. The fuzzified logical rules enable the system to retain the flexibility of deep learning while taking into account the rule interpretability.
[0096] 3. Strong dynamic adaptability
[0097] The model can adjust the recommendation strategy according to the dynamic changes of user interests to avoid "outdated memory" of recommended content. In the face of sudden changes in user interests, the system can quickly respond and adjust the recommended content.
[0098] 4. Wide generality
[0099] The model is applicable to various scenarios, such as e-commerce, streaming media, education platforms, etc., and has high promotion value; it provides flexible interfaces to support integration with various business logics and industry requirements.
[0100] The above shows and describes the basic principles, main features, and advantages of the present invention. For those skilled in the art, it is obvious that the present invention is not limited to the details of the above exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic features of the present invention.
[0101] Therefore, in any regard, the embodiments should be regarded as exemplary and non-limiting. The scope of the present invention is defined by the appended claims rather than the above description. Thus, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be encompassed within the present invention.
[0102] In addition, it should be understood that although this specification is described in terms of embodiments, not every embodiment contains only one independent technical solution. This narrative manner of the specification is merely for clarity. Those skilled in the art should regard the specification as a whole, and the technical solutions in each embodiment can also be appropriately combined to form other embodiments that can be understood by those skilled in the art.
Claims
1. A sequence recommendation method based on the fusion of positive and negative feedback and logical rules, characterized in that: include: The behaviors in the collected user behavior data are divided into positive feedback and negative feedback, and feedback sequences are constructed according to the time sequence of user behaviors, including positive feedback sequences and negative feedback sequences; The features of the user behavior sequence and feedback sequence are processed through the input layer to obtain the corresponding embedded features; The self-attention mechanism of the deep learning model built based on Transformer is used to process the embedded features of the input, capture the internal dependency characteristics of the original user behavior sequence, and cross-correlate the positive and negative feedback sequences with the input user behavior sequence through the cross-attention mechanism to model the dynamic relationship between user behavior and feedback; Through the output layer, the intermediate features of the model are mapped to the user's preference score for the target item, and finally a list of the user's scores for all candidate items is output for recommendation sorting.
2. According to claim 1, the sequence recommendation method based on the fusion of positive and negative feedback and logical rules is characterized in that: The loss function of the model is a comprehensive loss function, including Loss1 generated by the deep learning model and Loss2 generated by the logical rule module. By minimizing the comprehensive loss, the deep learning model and the logical rule module are optimized collaboratively, so that the model can follow the logical rules while learning the statistical features in the data. A dynamic weight adjustment mechanism is adopted to dynamically adjust the weights of Loss1 and Loss2, so that the logical rules can adapt to the dynamic changes in user interests.
3. According to claim 2, the sequence recommendation method based on the fusion of positive and negative feedback and logical rules is characterized in that: The logical rules are automatically mined from historical data through a decision tree method, and the Sigmoid function is used to fuzzify the logical rules to convert discrete rules into continuous values to adapt to the calculation of the deep learning model.
4. According to claim 2, the sequence recommendation method based on the fusion of positive and negative feedback and logical rules is characterized in that: The logic rules include positive rules for judging whether a preset condition is satisfied, and negative rules for judging whether a condition is not satisfied or is contrary to the preset condition. The positive rules and negative rules correspond to corresponding specific conditions respectively, and each specific condition corresponds to a corresponding weight.
5. According to claim 1, the sequence recommendation method based on the fusion of positive and negative feedback and logical rules is characterized in that: The positive feedback includes likes, purchases, collections, and high ratings; the negative feedback includes skipping, disinterest, low ratings, or clear marking as dislikes.
6. The sequence recommendation method based on the fusion of positive and negative feedback and logical rules according to claim 1, characterized in that: The said processing the features of the user behavior sequence and the feedback sequence respectively through the input layer to obtain the corresponding embedding features is processing the features of the user behavior sequence and the feedback sequence respectively through independent embedding layers, including: The original features of the items in the user behavior sequence / feedback sequence are taken as the first branch, and the user features, item features and time features are taken as the second branch. They are respectively represented as vectors through independent embedding layers to obtain two different implicit feature results; the two different implicit feature results are concatenated by column and subjected to linear transformation processing to obtain the corresponding implicit features, that is, the embedded features to be input into the deep learning model.
7. The sequence recommendation method based on the fusion of positive and negative feedback and logical rules according to claim 6 is characterized in that: The user characteristics include the user's age, gender, region, and historical preferences; the item characteristics include product category, price, brand, and popularity.
8. The sequence recommendation method based on the fusion of positive and negative feedback and logical rules according to claim 6, characterized in that: The first branch includes a first embedding layer function φ, and the second branch includes a second embedding layer function ψ; the first embedding layer function φ extracts implicit features z i The expression is as follows: The second embedding layer function ψ extracts implicit features q i The expression is as follows: q i =ψ(i i ,u,t i )=concat col (i i ,u,t i )W ψ +b ψ ,W ψ ∈R (j+l+k)×g ,b ψ ∈R g , The implicit feature e is obtained by concatenating two different implicit feature results by column i The expression is as follows: e i =ω(z i ,q i )=concat col (z i ,q i )W ω +b ω ,W ω ∈R (g+d)×d ,b ω ∈R d ; i i ,u,t i Represent item features, user features, and time features respectively, x i Indicates the original characteristics of the item. represents the weight and offset of the first embedding layer function, W ψ 、b ψ represents the weight and offset of the first embedding layer function, W ω 、b ω Represents the weight and offset of the concatenation function.
9. The sequence recommendation method based on the fusion of positive and negative feedback and logical rules according to claim 1, characterized in that: The deep learning model built based on Transformer includes at least one pre-processing module and an output module. The pre-processing module includes a multi-head attention module, a normalization module, and an FFN feedforward network module from the input side to the output side; the multi-head attention module models the data of the user behavior sequence input by the embedding layer; the output of the pre-processing module is input to the output module after normalization processing, and the output module includes an output cross-attention module, an FFN-OUT network module and a Sigmoid function from the input side to the output side. The cross-attention module models the normalized data output from the pre-processing module and the data of the feedback sequence input by the embedding layer. Sigmoid maps the input to between 0 and 1, and calculates the output score Scores; the obtained score Scores is combined with the true value to calculate the loss through the loss function Loss1, evaluates the quality of the model prediction result, and guides the update of the model parameters during the back propagation process to optimize the model performance.
10. The sequence recommendation method based on the fusion of positive and negative feedback and logical rules according to claim 1, characterized in that: The multi-head attention mechanism obtains the query, key and value through linear transformation of the input sequence, calculates the dot product of the query and the key, obtains the attention weight through the softmax function, and then multiplies it with the value to obtain the weighted output; by calculating multiple self-attention mechanisms in parallel, it can capture various dependencies at different positions of the input sequence.
Citation Information
Patent Citations
Deep reinforcement learning-based recommendation method and system with negative feedback
CN111523940A
Deep interest evolution recommendation method and device, equipment and storage medium
CN114417172A
User preference recommendation method and device based on neural network set operation
CN114637922A
Sequence recommendation method and system fusing cooperation information and self-attention mechanism
CN115269974A
Information recommendation method and device, electronic equipment and storage medium
CN116226509A
Cited By
Collaborative filtering recommendation method and system based on logic rule reasoning
CN120524046A