Concept and behavior fused interpretable sequence recommendation method, system and device

By obtaining the concept library and the historical behavior sequence of users, building historical concept sequences and concept embedding matrices, and combining the concept and behavior correlation strategies, generating concept weight matrix and concept behavior sequence sets, it solves the problem that existing technology is difficult to integrate coarse-grained concepts and fine-grained user behaviors, and achieves highly accurate and interpretable sequence recommendations.

CN119831028AActive Publication Date: 2025-04-15SHANTOU UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411636402.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-15
Publication Date
2025-04-15
Estimated Expiration
2044-11-15

AI Technical Summary

Technical Problem

The prior art is difficult to effectively integrate coarse-grained concepts and fine-grained user behavior, which makes it difficult to dynamically capture the conceptual meanings behind the changes when user behavior changes, thereby limiting the accuracy and interpretability of sequence recommendation results.

Method used

By obtaining the concept library and the user's historical behavior sequence, building historical concept sequences and concept embedding matrices, combining the concept and behavior association strategies, generating concept weight matrix and concept behavior sequence sets, and finally using this information to recommend sequences to obtain interpretable recommendation results.

Benefits of technology

It effectively integrates conceptual and behavioral information, dynamically adjusts the understanding and explanation of user preferences, and improves the accuracy and interpretability of sequence recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119831028A_ABST
    Figure CN119831028A_ABST
Patent Text Reader

Abstract

The invention provides an interpretable sequence recommendation method, system and device fusing concepts and behaviors, and relates to the technical field of recommendation systems.The method comprises the steps that a concept library and a historical behavior sequence of a user are obtained; obtaining a historical concept sequence and a concept embedding matrix according to the historical behavior sequence and the concept library; according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, a concept weight matrix and a concept behavior sequence set are obtained in combination with the association strategy of concepts and behaviors; and according to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set, performing sequence recommendation on the user to obtain an interpretable sequence recommendation result. According to the method, by introducing the association strategy of concepts and behaviors, abstract concept information and specific behavior information are effectively fused, and understanding and interpretation of user preferences are dynamically adjusted through the concept embedding matrix and the concept weight matrix, so that the accuracy and interpretability of a sequence recommendation result are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of recommendation systems, and in particular to an explainable sequence recommendation method, system and device that integrates concepts and behaviors. Background Art

[0002] Sequential recommendation is a recommendation system technology that predicts and recommends the next item that a user may be interested in based on the user's historical behavior sequence. The sequential recommendation method takes into account the user's continuous behavior and the time order between these behaviors, so that it can capture the user's dynamic preference changes. Related sequential recommendation technologies, such as counterfactual explanation models, provide users with diversified recommendations and explanations through partial behavior replacement, improving the transparency and credibility of the recommendation model. However, related technologies still cannot solve the integration problem between coarse-grained concepts and fine-grained user behaviors well. When the user's behavior changes, it is difficult for related technologies to dynamically capture the conceptual meaning behind these changes, so it is difficult to give persuasive and explainable sequential recommendation results, which limits the improvement of the accuracy of sequential recommendation results. Summary of the invention

[0003] The purpose of this application is to solve one of the technical problems existing in the prior art to at least a certain extent.

[0004] To this end, the purpose of this application is to provide an explainable sequence recommendation method, system and device that integrate concepts and behaviors, which are used to integrate concepts and behaviors for sequence recommendation and provide explainable sequence recommendation results.

[0005] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present application include: On the one hand, the embodiment of the present application provides an explainable sequence recommendation method integrating concepts and behaviors, comprising the following steps: Acquire a concept library and a user's historical behavior sequence; the concept library is a collection of all possible concepts; According to the historical behavior sequence and the concept library, a historical concept sequence and a concept embedding matrix are obtained; the historical concept sequence is a concept sequence corresponding to items related to the historical behavior sequence of the user; the concept embedding matrix is ​​used to represent the feature vectors of all concepts in the concept library; According to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, a concept weight matrix and a concept behavior sequence set are obtained in combination with the association strategy of concepts and behaviors; the association strategy of concepts and behaviors is used to obtain the connection between the historical behavior sequence and the historical concept sequence; According to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set, a sequence recommendation is performed on the user to obtain an explainable sequence recommendation result.

[0006] Further, the concept behavior sequence set includes a first behavior sequence, a second behavior sequence, a first concept behavior sequence, and a second concept behavior sequence; the concept weight matrix and the concept behavior sequence set are obtained according to the historical behavior sequence, the historical concept sequence, and the concept embedding matrix, combined with the association strategy of concepts and behaviors, including: According to the historical behavior sequence, obtaining the first behavior sequence and the second behavior sequence; According to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy between the concepts and behaviors, the concept weight matrix, the first concept behavior sequence and the second concept behavior sequence are obtained.

[0007] Further, obtaining the first behavior sequence and the second behavior sequence according to the historical behavior sequence includes: According to the historical behavior sequence, combined with a positive sample sampling processing method, the first behavior sequence is obtained; Counterfactual conversion processing is performed on the historical behavior sequence to obtain the second behavior sequence.

[0008] Furthermore, the process of obtaining the concept weight matrix, the first concept behavior sequence and the second concept behavior sequence according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix in combination with the association strategy between the concept and the behavior includes: According to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, the concept weight matrix is ​​obtained in combination with the association strategy between the concepts and behaviors; the concept weight matrix is ​​used to measure the contribution of each concept in the historical concept sequence to its related behaviors; The first concept behavior sequence and the second concept behavior sequence are obtained according to the historical behavior sequence, the concept embedding matrix and the concept weight matrix.

[0009] Further, obtaining the first concept behavior sequence and the second concept behavior sequence according to the historical behavior sequence, the concept embedding matrix and the concept weight matrix includes: Adding the product of the concept weight matrix and the concept embedding matrix to the historical behavior sequence to obtain the first concept behavior sequence; The first concept behavior sequence is masked to obtain the second concept behavior sequence.

[0010] Furthermore, performing sequence recommendation on the user according to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set to obtain an explainable sequence recommendation result includes: According to the historical behavior sequence and the concept behavior sequence set, using an explainable recommendation model, a sequence recommendation result set is obtained; The explainable sequence recommendation result is obtained by using the explainable recommendation model according to the sequence recommendation result set, the historical behavior sequence, the concept behavior sequence set, the concept embedding matrix and the concept weight matrix.

[0011] Furthermore, the process of obtaining a sequence recommendation result set based on the historical behavior sequence and the concept behavior sequence set by using an explainable recommendation model includes: According to the historical behavior sequence, using the explainable recommendation model, a first sequence of recommendation results is obtained; According to the first behavior sequence of the concept behavior sequence set, using the explainable recommendation model, obtain a second sequence recommendation result; According to the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence of the concept behavior sequence set, using the explainable recommendation model, a third sequence recommendation result is obtained; According to the first concept behavior sequence of the concept behavior sequence set, using the explainable recommendation model, obtaining a fourth sequence recommendation result; According to the second concept behavior sequence of the concept behavior sequence set, using the explainable recommendation model, obtaining a fifth sequence recommendation result; The first sequence recommendation result, the second sequence recommendation result, the third sequence recommendation result, the fourth sequence recommendation result and the fifth sequence recommendation result are taken as the sequence recommendation result set.

[0012] Furthermore, the explainable recommendation model includes a counterfactual explanation model; and the optimization method of the counterfactual explanation model includes a contrastive learning method.

[0013] On the other hand, the embodiment of the present application provides an explainable sequence recommendation system integrating concepts and behaviors, including: Data acquisition module, used to obtain the concept library and the user's historical behavior sequence; A concept embedding module, used to obtain a historical concept sequence and a concept embedding matrix according to the historical behavior sequence and the concept library; A concept and behavior association module, used to obtain a concept weight matrix and a concept behavior sequence set according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with a concept and behavior association strategy; The explainable sequence recommendation module is used to perform sequence recommendation on the user according to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set to obtain an explainable sequence recommendation result.

[0014] On the other hand, the embodiment of the present application provides an interpretable sequence recommendation device integrating concepts and behaviors, including: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the explainable sequence recommendation method for integrating concepts and behaviors as described in any one of claims 1 to 8.

[0015] The beneficial effects of the present application are as follows: the present application provides an interpretable sequence recommendation method, system and device that integrates concepts and behaviors. First, the concept library and the user's historical behavior sequence are obtained; secondly, according to the historical behavior sequence and the concept library, the historical concept sequence and the concept embedding matrix are obtained; furthermore, according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy of concepts and behaviors, the concept weight matrix and the concept behavior sequence set are obtained; finally, according to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set, the user is sequentially recommended to obtain an interpretable sequence recommendation result. By introducing the association strategy of concepts and behaviors, the present application not only effectively integrates abstract concept information with specific user behaviors, but also dynamically adjusts the understanding and interpretation of user preferences through the concept embedding matrix and the concept weight matrix, thereby improving the accuracy and interpretability of the sequence recommendation results.

[0016] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 is a flowchart of an interpretable sequence recommendation method integrating concepts and behaviors provided by the present application; Figure 2 is a flowchart of determining a first behavior sequence and a second behavior sequence provided by the present application; Figure 3 is a flowchart for determining a concept weight matrix, a first concept behavior sequence, and a second concept behavior sequence provided by the present application; Figure 4 This is the structural diagram of the explainable sequential recommendation system that integrates concepts and behaviors provided by the author; Figure 5 This is a comparison chart of the concept scores of SalExpl, CauseRec and 3Ce4Sr on the Sports dataset provided by this application; Figure 6 This is a comparison chart of the concept scores of SalExpl, CauseRec, and 3Ce4Sr on the Clothing dataset provided by this application; Figure 7 This is a comparison chart of the fidelity of RndExpl, SalExpl, CauseRec and 3Ce4Sr on four public datasets provided by this application; Figure 8 This is a stability comparison chart of RndExpl, SalExpl, CauseRec and 3Ce4Sr on four public data sets provided by this application. DETAILED DESCRIPTION

[0018] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0019] The present application is further described below in conjunction with the accompanying drawings and specific embodiments. The described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.

[0020] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0021] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0022] Recommendation systems are information filtering technologies that aim to help users find content that may interest them from a large number of options. They are widely used in e-commerce, social media, news and information, and other fields to improve user experience and promote business conversion through personalized recommendations. Sequential recommendation, as a special form of recommendation system, pays special attention to the time sequence of user behavior and uses the user's historical behavior sequence to predict their future behavior or interests. This makes the recommendation closer to the user's real-time needs and enhances the relevance and timeliness of the recommendation.

[0023] Traditional sequential recommendation methods usually rely on the user's past behavior sequence, using models such as recurrent neural networks, long short-term memory networks, or attention mechanisms to capture temporal dependencies. These models can learn user behavior patterns and make future recommendations based on them. However, such methods often lack interpretability, that is, it is difficult for users to understand why a specific item is recommended.

[0024] In recent years, in order to improve the transparency and credibility of recommendation systems, researchers have introduced interpretable models, such as counterfactual explanation models. Counterfactual explanation models generate different recommendation results by partially replacing certain actions in the user's historical behavior, thereby providing diverse recommendation explanations. For example, if a user does not purchase a certain product, the system can show the possible changes in the recommendation if the user purchases the product, in order to explain the reason for the current recommendation.

[0025] The existing counterfactual explanation models are mainly the following. The action-based counterfactual explanation model directly uses user behavior as the basis for explanation. Although it is intuitive, it can only reflect past preferences and cannot adapt to dynamic changes in preferences. The level-based counterfactual explanation model attempts to understand user behavior from a higher level, but it is difficult to achieve universality when extracting item-level features. The attribute-based counterfactual explanation model uses knowledge graphs to provide rich information, but due to the high overhead of graph search, the computational complexity is high.

[0026] In order to address the problems that existing interpretable models have difficulty integrating coarse-grained concepts and fine-grained user behaviors, lack high-level understanding capabilities when interpreting user behaviors or related features, and have difficulty effectively handling situations where user behaviors change over time, the embodiments of the present application provide an interpretable sequence recommendation method and system that integrates concepts and behaviors. By introducing an association strategy between concepts and behaviors, a multi-level and multi-dimensional connection between a user's historical concept sequence and historical behavior sequence is established. By combining the concept embedding matrix and the concept weight matrix, the sequence recommendation system can not only understand the user's preferences at a higher level, but also dynamically adapt to changes in user behavior, thereby improving the accuracy of the sequence recommendation and the interpretability of the sequence recommendation results, thereby enabling users to better understand the reasons for the sequence recommendation.

[0027] The following will describe in detail the implementation steps of an explainable sequence recommendation method that integrates concepts and behaviors provided by an embodiment of the present application with reference to the accompanying drawings.

[0028] The interpretable sequence recommendation method for integrating concepts and behaviors proposed in this application can be applied to terminals or servers, and can also be software running in terminals or servers. The terminal can be a tablet computer, a laptop computer, a desktop computer, etc., but is not limited to this. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks, and big data and artificial intelligence platforms.

[0029] Reference Figure 1 , Figure 1 This is a flowchart of the interpretable sequence recommendation method for integrating concepts and behaviors provided in the present application. The interpretable sequence recommendation method for integrating concepts and behaviors provided in the embodiments of the present application may include but is not limited to the following steps.

[0030] S101, obtain the concept library and the user's historical behavior sequence.

[0031] It should be noted that the historical behavior sequence refers to a series of user's past interactive behaviors, such as watching movies, purchasing goods, etc. These behaviors are arranged in chronological order and reflect the user's dynamic preferences. The concept library contains all possible concepts, which are pre-defined and cover a wide range of categories, such as type, theme, emotion, etc.

[0032] In this step, by collecting user behavior data and information from the concept library, basic data is provided for the subsequent recommendation process.

[0033] S102, according to the historical behavior sequence and the concept library, obtain the historical concept sequence and the concept embedding matrix.

[0034] It should be noted that the historical concept sequence refers to the set of concepts associated with the user's historical behavior. Each behavior can be associated with one or more concepts. For example, if the user watched the movie "Ip Man", the related concepts may include "action", "martial arts", "Chinese movies", etc. The concept embedding matrix is ​​used to represent all concepts in the concept library, where each row corresponds to the vector representation of a concept.

[0035] In this step, the historical concept sequence is obtained according to the historical behavior sequence and the concept library, thereby obtaining a concept set associated with the historical behavior sequence. In addition, by learning the embedding representation of the concept and obtaining the concept embedding matrix, the semantic relationship between different concepts can be better understood, and the abstract concept can be converted into a specific vector representation, which is convenient for calculation and processing.

[0036] Optionally, based on the concept library, the implementation process of obtaining the concept embedding matrix may include but is not limited to the following steps.

[0037] First, based on the concept library Constructing concept embedding matrix ,in is the number of concepts in the concept base, is the dimension of the feature vector of each concept.

[0038] Secondly, based on a certain moment in the historical concept sequence Corresponding concept set , for the concept embedding matrix Perform a search operation and you can get Concept feature vector ,in , A set of pre-set concepts A fixed value for the number of concepts in .

[0039] Furthermore, in order to explore middle The correlation between concepts is performed by a linear projection transformation, and they are connected in series in the last dimension to obtain the historical concept sequence at each moment. Corresponding concept information set , Satisfies the following formula (1): (1); In formula (1), represents a set of linear projection transformation matrices, Represents a concatenation operation.

[0040] Next, we predict the subsequent concepts that the user may like based on the concept information set corresponding to all moments in the historical concept sequence. , using the self-attention mechanism to build an encoder for sequence modeling , encoder Satisfies the following formula (2): (2); In formula (2), Represents the concept information set corresponding to all moments in the historical concept sequence, Represents a Transformer block, which includes a self-attention layer and a feed-forward neural network layer. By stacking multiple Transformer blocks, the semantic relevance between concepts and the user's preference for certain concepts can be more comprehensively captured, and the subsequent concept sequence can be predicted based on this. , the subsequent concept sequence Satisfies the following formula (3): (3); In formula (3), is the concept embedding matrix The transpose of .

[0041] In order to simplify the concept feature learning, the subsequent concept sequence The corresponding truth value is set to the maximum conceptual value ,Right now Therefore, based on the cross entropy loss function, the optimization function of the concept embedding matrix is Satisfies the following formula (4): (4); Finally, according to the optimization function of the concept embedding matrix , for the concept embedding matrix Make optimizations.

[0042] S103, according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy of concepts and behaviors, obtain the concept weight matrix and the concept behavior sequence set.

[0043] It should be noted that the concept weight matrix quantifies the degree of influence of each concept on user behavior. Different concepts may have different importance in different scenarios, and the concept weight matrix helps identify which concepts are more critical. The concept and behavior association strategy is used to establish the connection between the historical behavior sequence and the historical concept sequence. It analyzes the relationship between user behavior and related concepts, associates abstract concepts with specific behaviors, and thus better understands the changes in user preferences.

[0044] In this step, by introducing the association strategy of concepts and behaviors, the user's behavioral data is integrated with the conceptual information, and the concept weight matrix and concept behavior sequence set are constructed accordingly. This can help understand the user's concepts and behavior patterns at a higher level, which not only helps to generate more accurate recommendation results, but also provides concept-based explanations to enhance the interpretability of the recommendation results.

[0045] S104, based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set, a sequence recommendation is performed on the user to obtain an explainable sequence recommendation result.

[0046] In this step, based on the historical behavior sequence, concept embedding matrix, concept weight matrix and concept behavior sequence set, the items or concepts that the user may be interested in in the future are predicted. This not only takes into account the user's historical behavior, but also integrates the relevant conceptual information of the historical behavior to help users understand why specific items are recommended, thereby enhancing the transparency and credibility of the recommendation results.

[0047] In some embodiments of the present application, in the above step S103, the implementation process of obtaining the concept weight matrix and the concept behavior sequence set according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy of concepts and behaviors, may include but is not limited to the following steps.

[0048] S201, obtaining a first behavior sequence and a second behavior sequence according to a historical behavior sequence.

[0049] In this step, by obtaining the first behavior sequence and the second behavior sequence based on the historical behavior sequence, we can better understand how the recommendation results will change if the user takes different actions. This helps to generate diverse explanations for the recommendation results and improve the interpretability of the recommendation results.

[0050] S202, according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy between concepts and behaviors, obtain the concept weight matrix, the first concept behavior sequence and the second concept behavior sequence.

[0051] It should be noted that the concept behavior sequence set includes a first behavior sequence, a second behavior sequence, a first concept behavior sequence and a second concept behavior sequence.

[0052] In this step, by generating the first concept behavior sequence and the second concept behavior sequence, the user's behavior data and related concept information are obtained, providing a comprehensive data basis for subsequent recommendations and explanations. By combining the association strategy of concepts and behaviors, constructing the concept embedding matrix and the concept weight matrix, the user's behavior patterns can be understood and explained from multiple dimensions, thereby generating higher quality recommendation results and explanations.

[0053] In some embodiments of the present application, reference Figure 2 , Figure 2 It is a flowchart of determining the first behavior sequence and the second behavior sequence provided by the present application; in the above step S201, the implementation process of obtaining the first behavior sequence and the second behavior sequence according to the historical behavior sequence may include but is not limited to the following steps.

[0054] S301, obtaining a first behavior sequence according to a historical behavior sequence and a positive sample sampling processing method.

[0055] In this step, by sampling the user's historical behavior sequence, we extract behaviors that are highly relevant and representative of the user's interests or preferences to form the first behavior sequence. The first behavior sequence reflects the user's past behavior patterns and improves the relevance and accuracy of the recommendation results. At the same time, sampling reduces the amount of data, improves processing efficiency, and retains key information.

[0056] Optionally, the first line sequence satisfies the following formula (5): (5); In formula (5), The first line is the sequence, represents a collection of similar behavior sequences, Represents a historical behavior sequence.

[0057] S302, performing counterfactual conversion processing on the historical behavior sequence to obtain a second behavior sequence.

[0058] It should be noted that counterfactual transformation processing refers to generating a new behavior sequence by replacing or modifying certain behaviors in the user's historical behavior sequence, thereby simulating different behavior paths that the user may take.

[0059] In this step, the second behavior sequence generated by counterfactual transformation processing is similar to the historical behavior sequence but slightly different. The second behavior sequence is used to explore how the recommendation results would change if the user took different actions. In addition, counterfactual transformation provides a variety of recommendation explanations to help users understand the logic behind the recommendation results. For example, if the user does not buy a certain product, the system can show the possible changes in recommendations if the product is purchased. Therefore, the second behavior sequence helps to understand and adapt to changes in user preferences, thereby providing more flexible and personalized recommendations.

[0060] Optionally, the second behavior sequence satisfies the following formula (6): (6); In formula (6), Indicates the second line sequence, is the default counterfactual transformer, Represents a historical sequence of behaviors; Optionally, the loss function of the recommendation task based on the second behavior sequence satisfies the following formula (7): (7); In formula (7), is the loss function for the recommendation task based on the second behavior sequence; represents a counterfactual goal; Indicates the second behavior sequence After the sequence encoder The predicted value generated after encoding; is the regression loss function used to evaluate the predicted value and counterfactual goals the gap between; is the distribution distance loss function, which is used to measure the historical behavior sequence and the second line sequence Differences in distribution; Yes Control and right The contribution of balancing hyperparameters.

[0061] In general, by optimizing You can reduce the second behavior sequence After the sequence encoder The predicted value after encoding and counterfactual goals The gap between Can narrow down the historical behavior sequence Sequence with the second line By optimizing the overall loss function , you can use the second line sequence and counterfactual goals To lay the foundation for subsequent explainable recommendation tasks.

[0062] Optionally, the sequence encoder It can be set according to actual conditions, and the embodiments of the present application do not make any specific limitations on this.

[0063] For example, the sequence encoder It can be RNN or Transformer, but not limited to them.

[0064] Optionally, the regression loss function It can be set according to actual conditions, and the embodiments of the present application do not make any specific limitations on this.

[0065] For example, the regression loss function It can be a cross entropy loss function, but is not limited to it.

[0066] Optionally, the distribution distance loss function It can be set according to actual conditions, and the embodiments of the present application do not make any specific limitations on this.

[0067] For example, the distribution distance loss function Can be a measure of behavioral similarity or Regularization term, but not limited to it.

[0068] In some embodiments of the present application, reference Figure 3 , Figure 3It is a flowchart of determining the concept weight matrix, the first concept behavior sequence and the second concept behavior sequence provided by the present application; in the above step S202, according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy of concepts and behaviors, the implementation process of obtaining the concept weight matrix, the first concept behavior sequence and the second concept behavior sequence may include but is not limited to the following steps.

[0069] S401, according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy of concepts and behaviors, a concept weight matrix is ​​obtained.

[0070] It should be noted that the concept weight matrix is ​​used to measure the contribution of each concept in the historical concept sequence to its related behavior.

[0071] In this step, by constructing a concept weight matrix, we can obtain the degree of influence of each concept in the historical concept sequence on each behavior in the historical behavior sequence. This can help identify which concepts are more important in specific situations, which helps to more accurately capture user preferences and thus improve the relevance and accuracy of recommendations.

[0072] S402, obtaining a first concept behavior sequence and a second concept behavior sequence according to the historical behavior sequence, the concept embedding matrix and the concept weight matrix.

[0073] In this step, by combining the user's behavior information with the relevant concept information, the first concept behavior sequence and the second concept behavior sequence containing rich contextual information are generated. Not only the user's behavior but also the concepts behind these behaviors are taken into account, so as to understand and explain the user's behavior patterns from multiple dimensions and improve the quality and relevance of the recommendation results.

[0074] In some embodiments of the present application, in the above step S402, the implementation process of obtaining the first concept behavior sequence and the second concept behavior sequence according to the historical behavior sequence, the concept embedding matrix and the concept weight matrix may include but is not limited to the following steps.

[0075] S501, adding the product of the concept weight matrix and the concept embedding matrix to the historical behavior sequence to obtain a first concept behavior sequence.

[0076] In this step, by multiplying the concept weight matrix with the concept embedding matrix and combining the relative importance of the concept with its specific features, a new representation that integrates the importance and features of each concept can be obtained, thereby better reflecting the impact of these concepts on user behavior. Next, the above product is added to the historical behavior sequence to obtain the first concept behavior sequence, which integrates the user's behavior data and related concept information. It not only includes the user's actual past behavior, but also includes the conceptual meanings behind these behaviors, which can provide richer contextual information, thereby more accurately capturing the user's preference changes, thereby improving the accuracy and interpretability of the recommendation results.

[0077] Optionally, the first concept behavior sequence satisfies the following formula (8): (8); In formula (8), represents the first concept behavior sequence, Represents a historical behavior sequence, represents the concept embedding matrix, Represents the concept weight matrix.

[0078] S502: performing masking processing on the first concept behavior sequence to obtain a second concept behavior sequence.

[0079] In this step, by masking some concepts in the first concept behavior sequence that may have a negative impact on the recommendation results, a second concept behavior sequence is generated, which can not only better cope with noise and abnormal situations, but also provide more diverse, reasonable and effective explanations for the recommendation results.

[0080] Optionally, the process of performing masking processing on the first concept behavior sequence to obtain the second concept behavior sequence may include but is not limited to the following steps.

[0081] First, construct a trainable binary matrix , and according to the binary constraints To ensure The element value of , binary constraints Satisfies the following formula (9): (9); In formula (9), represents the indicator function, is the threshold for determining whether to block a behavior sequence.

[0082] Then, using the binary matrix First Concept Behavior Sequence Some concepts that may have a negative impact on the recommendation results are masked to generate the second concept behavior sequence . Second Concept Behavior Sequence Satisfies the following formula (10): (10); In formula (10), Represents the Hadamard product.

[0083] Finally, by masking the loss function To optimize the second concept behavior sequence , the masking loss function Satisfies the following formula (11): (11); In formula (11), represents the cross entropy loss function, Represents a binary constraint of Regularization, represents the counterfactual goal, Represents the second concept behavior sequence After the sequence encoder The predicted value after encoding.

[0084] In some embodiments of the present application, in the above step S104, a sequence recommendation is performed on the user based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set, and the implementation process of obtaining an explainable sequence recommendation result may include but is not limited to the following steps.

[0085] S601, based on the historical behavior sequence and the concept behavior sequence set, using the explainable recommendation model, obtain a sequence recommendation result set.

[0086] In this step, by using an explainable recommendation model based on historical behavior sequences and concept behavior sequence sets, a sequence recommendation result set is obtained, so that the recommendation process integrates coarse-grained concept information and fine-grained behavior information, which can capture richer contextual information and help discover users' potential interests, thereby improving the relevance and diversity of recommendations, laying the foundation for providing detailed recommendation explanations later, and ensuring that the recommendations are not only accurate but also can be reasonably parsed.

[0087] S602, obtaining an explainable sequence recommendation result by using an explainable recommendation model according to the sequence recommendation result set, the historical behavior sequence, the concept behavior sequence set, the concept embedding matrix and the concept weight matrix.

[0088] In this step, the explainable recommendation model is used to integrate the sequence recommendation result set, historical behavior sequence, concept embedding matrix and concept weight matrix, taking into account the user's behavior habits and integrating relevant concept information. The concept embedding matrix provides a vector representation of each concept, while the concept weight matrix reflects the importance of each concept to the user's preference. This explainable recommendation model combines the concept embedding matrix and the concept weight matrix to clearly explain how the recommendation results are affected by different concepts, so that more accurate and easy-to-understand recommendation results can be provided, making it easier for users to understand why certain items are recommended to them, and also enhancing the persuasiveness of the recommendation method, making the recommendation more personalized and targeted.

[0089] Optionally, the interpretable recommendation model combines the concept embedding matrix and the concept weight matrix to explain the recommendation results in the following formula (12): (12); In formula (12), represents the explanation of the recommendation result by the explainable recommendation model; according to formula (8), the second concept behavior sequence ,therefore Second concept behavior sequence Through the sequential recommender The predicted value obtained after encoding; Represents the concept weight matrix of Regularization, Represents the concept weight matrix of Regularization, It is used for balance The hyperparameters that contribute to It is used for balance The hyperparameters that contribute to .

[0090] Through the elastic network architecture, the concept weight-based explanation uses the concept weight matrix of Regularization achieves sparsity, that is, filtering out a small number of irrelevant concepts. In addition, the concept weight matrix of Regularization ensures that the concept weight matrix The combination of these two regularizations optimizes the concept weight matrix , the weights of concepts that have little impact on the results tend to 0, while some concepts that are relatively important for counterfactual predictions are assigned larger weight values.

[0091] In some embodiments of the present application, in the above step S601, the implementation process of obtaining a sequence recommendation result set based on the historical behavior sequence and the concept behavior sequence set using an explainable recommendation model may include but is not limited to the following steps.

[0092] S701, according to the historical behavior sequence, using the explainable recommendation model, obtain the first sequence of recommendation results.

[0093] In this step, recommendation prediction is performed based on the historical behavior sequence to obtain the first sequence of recommendation results, providing a baseline recommendation based on the historical behavior sequence.

[0094] S702, according to the first behavior sequence of the concept behavior sequence set, using an explainable recommendation model, obtain a second sequence recommendation result.

[0095] In this step, recommendations are made based on the first behavior sequence in the concept behavior sequence set that is highly relevant to the user's interests or preferences and is representative, and the second sequence recommendation results are obtained, which can more accurately reflect the user's potential needs.

[0096] S703, obtaining a third sequence recommendation result by using an explainable recommendation model according to the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence of the concept behavior sequence set.

[0097] In this step, by integrating the second behavior sequence processed by counterfactual transformation and the first concept behavior sequence and the second concept behavior sequence that integrate concept information and behavior information and performing recommendation prediction, the third sequence recommendation result is obtained, aiming to explore the expression of user preferences under the combination of multiple concepts and behaviors, more comprehensively reflect the user's possible interests, and make more diversified recommendations based on this.

[0098] S704, obtaining a fourth sequence of recommendation results using an explainable recommendation model according to the first concept-behavior sequence of the concept-behavior sequence set.

[0099] In this step, recommendation prediction is performed based on the first concept-behavior sequence that integrates concept information and behavior information in the concept-behavior sequence set to obtain a fourth sequence recommendation result.

[0100] S705 , obtaining a fifth sequence of recommendation results using an explainable recommendation model according to the second concept behavior sequence of the concept behavior sequence set.

[0101] In this step, by performing recommendation prediction based on the masked second concept behavior sequence to obtain the fifth sequence recommendation results, concepts that may have a negative impact on the recommendation effect can be filtered out, thereby improving the quality and diversity of recommendations.

[0102] S706: The first sequence recommendation results, the second sequence recommendation results, the third sequence recommendation results, the fourth sequence recommendation results and the fifth sequence recommendation results are taken as a sequence recommendation result set.

[0103] In this step, the recommendation results generated in all previous steps are summarized to form a complete set of recommendation results, providing comprehensive recommendation suggestions for subsequent steps.

[0104] In some embodiments of the present application, in the above-mentioned steps S601 and S602, the explainable recommendation model includes a counterfactual explanation model.

[0105] Counterfactual explanation modeling is a technology used in recommendation systems that predicts changes in recommendation results by simulating changes in user behavior, thereby providing explanations behind the recommendations. The main purpose of using counterfactual explanation models is to enhance the interpretability, transparency, and user experience of recommendation systems. It helps users understand how recommendations are generated and shows different recommendation results that may result from different behaviors. Combining the sequential recommendation result set, historical behavior sequence, concept embedding matrix, and concept weight matrix, the counterfactual explanation model can create virtual scenarios, adjust user behavior or concept weights, and observe changes in recommendation results, thereby identifying specific factors that have a significant impact on recommendations and providing users with clear and specific recommendation explanations.

[0106] In some embodiments of the present application, the optimization method of the counterfactual explanation model includes a contrastive learning method.

[0107] Contrastive learning is an unsupervised or self-supervised learning method that enables the model to learn the intrinsic structure of the data and generate high-quality feature representations by distinguishing between positive sample pairs (similar samples) and negative sample pairs (dissimilar samples). This method not only improves the quality of feature representation and the robustness of the model, but also effectively utilizes unlabeled data and promotes transfer learning.

[0108] The key to effective counterfactual explanation is to quantify and reflect the influence of a concept in a concept behavior sequence. This process can be achieved through contrastive learning, comparing the user's historical behavior sequence and the concept behavior sequence set. If a concept contributes more to the sequence, then the performance of the sequence should change significantly after adding the concept. On the contrary, if a concept contributes less, then the performance of the sequence will not change much after adding the concept, so contrastive learning can be used to quantify the influence of the concept.

[0109] In the counterfactual explanation model, contrastive learning optimizes the model by generating actual behavior and adjusted behavior as positive sample pairs and completely unrelated behavior as negative sample pairs. This can learn the subtle differences in user behavior patterns and help identify which factors affect recommendation results, thereby enhancing the interpretability of the recommendation system and allowing users to better understand the recommendation logic.

[0110] Optionally, the implementation process of the optimization method of the counterfactual explanation model may include but is not limited to the following steps.

[0111] First, similarly to the above step S102, according to the concept embedding matrix and formula (4), the loss function of the concept embedding matrix is ​​obtained: , which helps to improve the generalization ability and stability of the model because it is built based on the user's preference for selecting concepts, which means that the model can understand and learn the relationship between concepts from more perspectives, thereby improving the accuracy and stability of recommendations.

[0112] Secondly, according to the first sequence recommendation results, the second sequence recommendation results and the third sequence recommendation results in the sequence recommendation result set, a first contrastive learning loss function is constructed.

[0113] The first contrastive learning loss function satisfies the following formula (13): (13); In formula (13), represents the first contrastive learning loss function; represents similarity function; Represents the first sequence of recommendation results, that is, the historical behavior sequence Through the sequential recommender The predicted value obtained after encoding; Indicates the second sequence recommendation results, that is, the first line sequence Through the sequential recommender The predicted value obtained after encoding; Indicates the third sequence recommendation result, which is the combination of the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence Through the sequential recommender The predicted value obtained after encoding; is a hyperparameter that controls the contrast temperature.

[0114] Then, according to the first sequence recommendation result, the second sequence recommendation result, the fourth sequence recommendation result and the fifth sequence recommendation result in the sequence recommendation result set, a second contrastive learning loss function is constructed, and the second contrastive learning loss function satisfies the following formula (14): (14); In formula (14), represents the second contrastive learning loss function; Indicates the fourth sequence recommendation results, that is, the first concept behavior sequence Through the sequential recommender The predicted value obtained; Indicates the fifth sequence recommendation result, that is, the second concept behavior sequence Through the sequential recommender The predicted value obtained.

[0115] Optionally, a sequence recommender It can be set according to actual conditions, and the embodiments of the present application do not make any specific limitations on this.

[0116] For example, the sequential recommender It can be RNN or Transformer, but not limited to them.

[0117] By optimizing the first contrastive learning loss function and the second contrastive learning loss function , we can expect the sequential recommender and It learns how to correctly handle various types of behavior sequences and can accurately distinguish between similar and dissimilar sequences. In this way, when a new sequence is given, the model can determine which category the sequence belongs to based on the previously learned knowledge, thereby providing better recommendation services. In addition, the first contrastive learning loss function and the second contrastive learning loss function Optimization also helps improve the generalization ability of the model because it is calculated based on the similarity of multiple sample pairs rather than relying solely on a single sample. This means that the model can understand and learn the relationship between sequences from more perspectives, thereby improving the accuracy and stability of recommendations.

[0118] Furthermore, based on the concept weight matrix, historical behavior sequence and concept behavior sequence set, the recommendation task loss function is constructed. The recommendation task loss function satisfies the following formula (15): (15); In formula (15), represents the recommendation task loss function; represents the cross entropy loss function; express , and The combination of The predicted value obtained; yes and The combination of The predicted value obtained; yes Through the sequential recommender The predicted value obtained is Represents a binary constraint of Regularization.

[0119] Finally, the counterfactual explanation model is optimized by a comprehensive loss function, which satisfies the following formula (16): (16); In formula (16), represents the comprehensive loss function, is used to control the first contrastive learning loss function The hyperparameters that contribute to is used to control the second contrastive learning loss function The hyperparameters that contribute to .

[0120] Reference Figure 4 , Figure 4 This is a structural diagram of the interpretable sequential recommendation system that integrates concepts and behaviors provided by the present application. The interpretable sequential recommendation system that integrates concepts and behaviors provided by the embodiment of the present application may include but is not limited to the following modules.

[0121] Data acquisition module 801, used to acquire concept library and user's historical behavior sequence; A concept embedding module 802 is used to obtain a historical concept sequence and a concept embedding matrix according to the historical behavior sequence and the concept library; The concept and behavior association module 803 is used to obtain a concept weight matrix and a concept behavior sequence set according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the concept and behavior association strategy; The explainable sequence recommendation module 804 is used to perform sequence recommendation on users based on the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set to obtain an explainable sequence recommendation result.

[0122] On the other hand, the embodiment of the present application provides an interpretable sequence recommendation device integrating concepts and behaviors, including: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the aforementioned interpretable sequence recommendation method that integrates concepts and behaviors.

[0123] The following performance comparison experiment will be used to verify the advanced performance of the interpretable sequence recommendation method, system and device that integrates concepts and behaviors provided by the present application.

[0124] First, the following seven classic sequential recommendation models are selected as comparison models for the Contrastive Conceptual Counterfactual Explanation for Sequential Recommendation (3Ce4Sr) method that integrates concepts and behaviors provided in this application.

[0125] 1. GRU4Rec (Gated Recurrent Unit for Session-based Recommendation), which is a sequence recommendation model based on gated recurrent units. It uses the powerful memory capacity of the GRU network to capture long-term dependencies in user behavior sequences and make recommendations based on them. Although GRU4Rec can handle dynamic changes in time, its performance is heavily dependent on the expressive power of the GRU itself.

[0126] 2. STAMP (Short-Term Attention / Memory Priority Model) is a model that combines short-term attention mechanism and memory priority. This model aims to improve the ability to capture the latest preferences by focusing on recent behaviors. However, STAMP is limited by the expressive power of traditional attention mechanisms and may not be able to fully understand complex user preference patterns in some cases.

[0127] 3. SASRec (Self-Attention based Sequential Recommendation) is a sequential recommendation model based on the self-attention mechanism. By introducing the self-attention layer, SASRec can better capture the complex relationships within the user behavior sequence. This mechanism enables the model to establish connections between different positions, thereby enhancing the recommendation effect.

[0128] 4. BERT4Rec (Bidirectional Encoder Representations from Transformers for Sequential Recommendations) uses a similar BERT architecture to the widely used BERT architecture in the field of natural language processing for sequential recommendations. Through a deep bidirectional self-attention mechanism, BERT4Rec can more effectively encode the user's interaction history and provide context-aware representations.

[0129] 5. CauseRec (Counterfactual User Sequence Synthesis for Sequential Recommendation) is a sequential recommendation model combined with counterfactual data enhancement. It not only provides recommendation results, but also gives diversified recommendation explanations by partial behavior replacement, which improves the transparency and credibility of the recommendation system. CauseRec uses an attention mechanism to distinguish concepts and provide users with clearer explanations.

[0130] 6. CL4SRec (Contrastive Learning for Sequential Recommendation) is a sequential recommendation model based on contrastive learning. It optimizes the recommendation effect by introducing multiple data enhancement strategies. This method compares the differences between positive and negative samples, strengthens the model's understanding of user behavior sequences, and improves the quality of recommendations.

[0131] 7. DuoRec (Contrastive Learning for Representation Degeneration Problem in Sequential Recommendation) is a sequential recommendation model that introduces supervised contrastive learning, which proves the effectiveness of self-supervised contrastive learning. By comparing the similarities and differences between different user behavior sequences, DuoRec can learn higher-quality user representations, thereby improving recommendation performance.

[0132] In order to better verify the effectiveness of the above eight models, this application uses the following two evaluation indicators commonly used in recommendation systems: HR@N (Hit Ratio at N) and NDCG@N (Normalized Discounted Cumulative Gain atN) as evaluation indicators for performance comparison, where N = {5,10}. These indicators are usually used to evaluate the quality of the top items in the recommendation list, because users often only pay attention to the first few items in the recommendation list.

[0133] 1. HR@N measures the proportion of the top N items recommended to users in which at least one item is actually interacted with (e.g. clicked, purchased, etc.) by the user. If any item in the recommended list is of real interest to the user or has been interacted with by the user, it is considered a "hit".

[0134] 2. NDCG@N not only considers whether there are items in the top N items in the recommendation list that the user actually interacts with, but also further considers the ranking order of these items and their relevance. It is calculated by discounted cumulative gain and normalized to eliminate the impact of different recommendation list lengths between different users.

[0135] In addition, the embodiment of the present application selected four public data sets to verify the performance of the above eight models. The four public data sets are Beauty, Clothing, Sports and Diginetica, among which the Beauty data set, Clothing data set and Sports data set are selected from the Amazon data set, and the Diginetica data set is from the CIKM cup 2016, which includes user historical behaviors extracted from e-commerce search engine logs. Since these four public data sets already contain rich item category information, the embodiment of the present application directly extracts this category information as concepts.

[0136] Refer to Table 1 below, which shows the statistical information of the above four public datasets, where "Dataset" represents the dataset name, "*Users" represents the number of users in each dataset, "Items" represents the number of commodities / items in each dataset, "Concepts" represents the number of concepts in each dataset, "Interactions" represents the number of interactions between users and items, that is, the total number of behavior records generated by users in the dataset, "Asl" represents the average number of items in each user's behavior sequence, and "Sparsity" represents the number of interactions between users and items. Indicates the sparsity of the dataset.

[0137] Table 1 Statistics of four datasets

[0138] For data preprocessing, this application first filters out sequences with a length of less than 3 in the data set. Then, all concepts are collected and stored in the concept library. In order to prepare for learning concepts, this application searches for concepts corresponding to each behavior sequence and forms related concept states. Finally, subsequences are generated for concept comparison learning. In order to ensure fair comparison, the data processing details of this application are consistent with existing comparison methods.

[0139] Refer to Table 2 below, which shows the performance comparison experimental results of 3Ce4Sr proposed in the embodiment of the present application and seven comparison models.

[0140] Table 2 Performance comparison test results (%)

[0141] As can be seen from Table 2 above, for the comparison model, STAMP is limited by the expressive power of the traditional attention mechanism, which limits its ability to capture complex user behavior patterns. GRU4Rec relies heavily on the performance of the gated recurrent unit (GRU), and its recommendation effect depends largely on the memory and processing power of the GRU network. SASRec uses the powerful sequence modeling ability of the self-attention mechanism, and its performance on some data sets (such as Diginetica) is even better than the contrastive learning method CL4SRec. BERT4Rec is based on a deep bidirectional self-attention mechanism, and its overall performance is better than SASRec. It can more effectively encode the user's interaction history and provide context-aware representation. The advantage of CL4SRec is that it introduces a variety of data augmentation strategies to optimize the recommendation effect. CauseRec uses counterfactual data augmentation technology, and its overall performance is slightly better than SASRec, providing users with diverse recommendation explanations. DuoRec's performance is second only to the 3Ce4Sr model proposed in this application, proving the effectiveness of self-supervised contrastive learning and its performance is excellent.

[0142] In contrast, the 3Ce4Sr model proposed in this application not only adopts the contrastive learning method, but also deeply integrates the concept semantics into the user behavior sequence through concept-behavior association and concept comparison. This comprehensive approach enables 3Ce4Sr to understand user preferences more deeply, and it outperforms other similar technical methods in four performance evaluation indicators on four data sets, thus verifying the superiority and effectiveness of 3Ce4Sr in performance.

[0143] In addition, the embodiments of the present application will verify the interpretability of the interpretable sequence recommendation method, system and device that integrates concepts and behaviors provided by the present application through the following interpretable experimental embodiments.

[0144] First, the following three classic interpretable models are selected as comparison models for the interpretable sequence recommendation method 3Ce4Sr that integrates concepts and behaviors provided in this application, including the random explanation model (Random Explanation, RndExpl), the salience-based explanation model (SalExpl) and CauseRec. Among them, RndExpl implements counterfactual explanations based on random selection of concepts and does not rely on any model or data characteristics; SalExpl generates counterfactual explanations by weighting the concept sequence and selecting the concepts with the highest and lowest scores, and uses the significance score to determine which concepts are most important for prediction.

[0145] Furthermore, the embodiment of the present application also selects the above four public data sets Beauty, Clothing, Sports and Diginetica to verify the interpretability of the above four interpretable models.

[0146] Then, in order to achieve explainable recommendations for the contrast model, for RndExpl, the embodiment of the present application generates counterfactual explanations by randomly selecting concepts. For SalExpl, the embodiment of the present application first generates relevant weights for each concept in the concept sequence, and then selects the concepts with the highest and lowest scores to construct counterfactual explanations. For CauseRec, the embodiment of the present application distinguishes the importance of different concepts by combining the attention mechanism, thereby achieving counterfactual explanations. In particular, SalExpl and CauseRec extract concept states in the same way as 3Ce4Sr to form a concept sequence, and select the concept with the largest median value of the concept state as a representative to predict counterfactual concepts.

[0147] In order to examine the explanatory effects of several concept-related models, this embodiment of the application selects SalExpl, CauseRec and 3Ce4Sr for an intuitive comparison of the explanation results. For SalExpl, this embodiment of the application uses a saliency score to evaluate the impact of each concept on counterfactual predictions. For CauseRec, this embodiment of the application measures the importance of each concept through an attention weight score. Concept scores show the degree of influence of a concept on counterfactual predictions. Specifically, a positive concept score means that the concept has a positive impact on the prediction result; a negative concept score indicates that the concept has a negative impact on the prediction result.

[0148] Reference Figure 4 and Figure 5 , Figure 4 This is a comparison chart of the concept scores of SalExpl, CauseRec and 3Ce4Sr on the Sports dataset provided by this application; Figure 5 It is the concept score of SalExpl, CauseRec and 3Ce4Sr on the Clothing dataset provided by this application.

[0149] It can be seen that the 3Ce4Sr model can obtain correct predictions from concepts with lower scores, which shows that even some seemingly unimportant concepts may have an impact on the final recommendation results. The 3Ce4Sr model can also identify and propose concepts that may have a greater contribution to counterfactual predictions. By looking for concepts that have an important impact in counterfactual scenarios, the 3Ce4Sr model can provide a more comprehensive and in-depth explanation.

[0150] In addition, the concept score values ​​generated by the 3Ce4Sr model are relatively high, which means that the counterfactual explanation of the 3Ce4Sr model is more sensitive to changes in the recommended results. It can more accurately capture the subtle relationship between concepts and results, thus providing more accurate and detailed explanations than other models. This ability enables 3Ce4Sr to not only perform well in recommendation accuracy, but also enhance the interpretability and transparency of the recommendation system.

[0151] Secondly, in order to better verify the effectiveness of the above four interpretable models, this application uses the following two evaluation indicators commonly used in recommendation systems: fidelity and stability to evaluate the quality of conceptual counterfactual explanations.

[0152] 1. Fidelity is an indicator used to measure the interpretability of the recommendation model, which is defined as the percentage of explainable items to the total number of recommended items. High fidelity means that the model can give reasonable explanations for more recommendation results.

[0153] 2. Stability is used to measure the consistency of the explanations generated by the model across multiple runs. A stable explanation model should be able to produce similar results under the same conditions, indicating the reliability and consistency of the model.

[0154] Reference Figure 6 and Figure 7 , Figure 6 This is a comparison chart of the fidelity of RndExpl, SalExpl, CauseRec and 3Ce4Sr on four public datasets provided by this application; Figure 7 This is a stability comparison chart of RndExpl, SalExpl, CauseRec and 3Ce4Sr on four public data sets provided by this application.

[0155] From the performance of the four interpretable models, we can see that RndExpl, as a random method, performs the worst in terms of fidelity and stability; SalExpl assigns weights to different concepts by introducing a saliency weighting algorithm, so its overall performance is better than RndExpl; CauseRec uses an attention mechanism to grasp the global relevance of concepts from the entire behavior sequence, so the performance of CauseRec is slightly better than SalExpl. Compared with these methods, the 3Ce4Sr model proposed by us shows the highest fidelity and stability on the four datasets. High fidelity means that 3Ce4Sr can provide more conceptual explanations when recommending the same number of items, which is consistent with the model's ability to explain different concepts. In addition, high stability shows that the conceptual explanations generated by the method of the present invention in multiple model predictions under the same conditions are usually the same and consistent with the data. In general, the advantages in fidelity and stability increase the persuasiveness of the model's prediction results and the user's trust in the model, so users are more likely to accept the conceptual explanations of 3Ce4Sr.

[0156] In summary, the embodiments of the present application can provide the following technical effects: On the one hand, this application effectively integrates abstract conceptual information with specific user behaviors by introducing the association strategy of concepts and behaviors, thereby achieving a deep understanding of user preferences. Specifically, this application first obtains the user's historical behavior sequence and the associated historical concept sequence, and then represents these concepts and their importance to related behaviors by constructing a concept embedding matrix and a concept weight matrix. The concept embedding matrix captures the semantic relationship between concepts, while the concept weight matrix reflects the degree of influence of each concept on predicting user behavior. Therefore, this application can dynamically adjust the model's understanding and interpretation of user preferences, so that the recommendation system is not only based on the user's historical behavior, but also combined with a broader conceptual background, thereby improving the accuracy and personalization of the recommendation results.

[0157] On the other hand, this application introduces a contrastive learning method to optimize the counterfactual explanation model. The optimized counterfactual explanation model can more effectively capture the complex connections between user behaviors and related concepts, and use these connections to generate more accurate and meaningful recommendations and explanations. This not only improves the performance indicators of the model in terms of accuracy and recall, but also ensures that the generated counterfactual explanations have higher fidelity and stability, ultimately providing users with a recommendation experience that is both practical and easy to understand.

[0158] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and alterations may be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

[0159] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the described embodiments. Those skilled in the art may make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. An explainable sequence recommendation method that integrates concepts and behaviors, characterized by: The steps include: Acquire a concept library and a user's historical behavior sequence; the concept library is a collection of all possible concepts; According to the historical behavior sequence and the concept library, a historical concept sequence and a concept embedding matrix are obtained; the historical concept sequence is a concept sequence corresponding to items related to the historical behavior sequence of the user; the concept embedding matrix is ​​used to represent the feature vectors of all concepts in the concept library; According to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, a concept weight matrix and a concept behavior sequence set are obtained in combination with the association strategy of concepts and behaviors; the association strategy of concepts and behaviors is used to obtain the connection between the historical behavior sequence and the historical concept sequence; According to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set, a sequence recommendation is performed on the user to obtain an explainable sequence recommendation result.

2. The interpretable sequence recommendation method integrating concepts and behaviors according to claim 1, characterized in that: The concept behavior sequence set includes a first behavior sequence, a second behavior sequence, a first concept behavior sequence and a second concept behavior sequence; the concept weight matrix and the concept behavior sequence set are obtained according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy of concepts and behaviors, including: According to the historical behavior sequence, obtaining the first behavior sequence and the second behavior sequence; According to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the association strategy between the concepts and behaviors, the concept weight matrix, the first concept behavior sequence and the second concept behavior sequence are obtained.

3. The interpretable sequence recommendation method integrating concepts and behaviors according to claim 2 is characterized in that: The obtaining the first behavior sequence and the second behavior sequence according to the historical behavior sequence includes: According to the historical behavior sequence, combined with a positive sample sampling processing method, the first behavior sequence is obtained; Counterfactual conversion processing is performed on the historical behavior sequence to obtain the second behavior sequence.

4. The interpretable sequence recommendation method integrating concepts and behaviors according to claim 2, characterized in that: The step of obtaining the concept weight matrix, the first concept behavior sequence and the second concept behavior sequence according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix in combination with the association strategy between the concept and the behavior includes: According to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, the concept weight matrix is ​​obtained in combination with the association strategy between the concepts and behaviors; the concept weight matrix is ​​used to measure the contribution of each concept in the historical concept sequence to its related behaviors; The first concept behavior sequence and the second concept behavior sequence are obtained according to the historical behavior sequence, the concept embedding matrix and the concept weight matrix.

5. The interpretable sequence recommendation method integrating concepts and behaviors according to claim 4 is characterized in that: The obtaining the first concept behavior sequence and the second concept behavior sequence according to the historical behavior sequence, the concept embedding matrix and the concept weight matrix comprises: Adding the product of the concept weight matrix and the concept embedding matrix to the historical behavior sequence to obtain the first concept behavior sequence; The first concept behavior sequence is masked to obtain the second concept behavior sequence.

6. The interpretable sequence recommendation method integrating concepts and behaviors according to claim 1, characterized in that: The step of performing sequence recommendation on the user according to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set to obtain an explainable sequence recommendation result includes: According to the historical behavior sequence and the concept behavior sequence set, using an explainable recommendation model, a sequence recommendation result set is obtained; The explainable sequence recommendation result is obtained by using the explainable recommendation model according to the sequence recommendation result set, the historical behavior sequence, the concept behavior sequence set, the concept embedding matrix and the concept weight matrix.

7. The interpretable sequence recommendation method integrating concepts and behaviors according to claim 6 is characterized in that: The step of obtaining a sequence recommendation result set based on the historical behavior sequence and the concept behavior sequence set by using an explainable recommendation model includes: According to the historical behavior sequence, using the explainable recommendation model, a first sequence of recommendation results is obtained; According to the first behavior sequence of the concept behavior sequence set, using the explainable recommendation model, obtain a second sequence recommendation result; According to the second behavior sequence, the first concept behavior sequence, and the second concept behavior sequence of the concept behavior sequence set, using the explainable recommendation model, a third sequence recommendation result is obtained; According to the first concept behavior sequence of the concept behavior sequence set, using the explainable recommendation model, obtaining a fourth sequence recommendation result; According to the second concept behavior sequence of the concept behavior sequence set, using the explainable recommendation model, obtaining a fifth sequence recommendation result; The first sequence recommendation result, the second sequence recommendation result, the third sequence recommendation result, the fourth sequence recommendation result and the fifth sequence recommendation result are taken as the sequence recommendation result set.

8. The interpretable sequence recommendation method integrating concepts and behaviors according to claim 6, characterized in that: The explainable recommendation model includes a counterfactual explanation model; the optimization method of the counterfactual explanation model includes a contrastive learning method.

9. An explainable sequential recommendation system that integrates concepts and behaviors, characterized by: include: Data acquisition module, used to obtain the concept library and the user's historical behavior sequence; A concept embedding module, used to obtain a historical concept sequence and a concept embedding matrix according to the historical behavior sequence and the concept library; A concept and behavior association module, used to obtain a concept weight matrix and a concept behavior sequence set according to the historical behavior sequence, the historical concept sequence and the concept embedding matrix, combined with the concept and behavior association strategy; The explainable sequence recommendation module is used to perform sequence recommendation on the user according to the historical behavior sequence, the concept embedding matrix, the concept weight matrix and the concept behavior sequence set to obtain an explainable sequence recommendation result.

10. An explainable sequence recommendation device integrating concepts and behaviors, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the explainable sequence recommendation method for integrating concepts and behaviors as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Sequence recommendation method and device based on hypergraph and local attention enhancement

    CN117807309A

  • Automatic decoupling sequence recommendation method based on large language model

    CN118410244A

  • Method and system for constructing virtual environment for ride-hailing platforms

    WO2021226925A1