A gating context explainable recommendation method and system based on a policy value network, a computer device, and a storage medium

CN122796293APending Publication Date: 2026-09-22HENAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610924884.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-25
Publication Date
2026-09-22

AI Technical Summary

Technical Problem

[0004]为了解决现有技术中可解释推荐模型的推荐效率和推荐准确率较低的不足,本发明提供一种基于策略价值网络的门控上下文可解释推荐方法、系统、计算机设备及存储介质

Benefits of technology

[0015]与现有技术相比,本发明有如下有益效果:本发明的推荐模型包括门控上下文知识图谱嵌入模块和决策模块,利用门控上下文知识图谱嵌入模块对当前实体的原始特征与推理路径的时序上下文特征进行动态融合得到融合特征,动态融合过程基于原始特征和时序上下文特征的重要性进行自适应权衡,当路径上下文信息丰富且可信时,增加时序上下文特征在融合特征中的影响,当路径上下文信息包含大量噪音时,增加当前实体的原始特征在融合特征中的影响,以当前实体的固有属性来保证融合特征的稳定性,有效避免了长路径推理中的语义漂移问题。在决策模块的推理过程中引入了基于语义评分动作剪枝机制,在每一步推理时,计算所有出边邻居的语义评分并且对语义评分进行降序排列,采用动作掩码保留语义评分高的出边邻居参与后续计算,动作剪枝机制能够压缩动作空间,屏蔽无关节点的干扰,大幅提升推荐模型的推理效率和推荐准确率。最后,本发明的推荐模型为了克服贪心搜索易陷于局部最优的缺陷,在推理路径的选择上,采用了波束搜索的推理方法,波束搜索的推理路径基于出边邻居的动作概率和语义评分进行综合计算,以综合评分作为路径选择的依据,波束搜索能够保留多条高质量推理路径,确保最终输出的推荐结果兼具准确性与可解释性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122796293A_ABST
    Figure CN122796293A_ABST
Patent Text Reader

Abstract

The application discloses a gating context explainable recommendation method based on a strategy value network, relates to the technical field of explainable recommendation, and comprises the following steps: receiving a recommendation request of a user and analyzing the recommendation request to obtain a starting entity and an intention feature; inputting the starting entity and the intention feature into a pre-trained recommendation model for reasoning to obtain a recommendation result and a recommendation explanation corresponding to the recommendation result; the recommendation model comprises a gating context knowledge graph embedding module and a decision module, the decision module comprises a strategy network, the gating context knowledge graph embedding module is used to dynamically fuse original features of a current entity and time sequence context features of a reasoning path to obtain fused features, the strategy network is used to process the fused features to obtain original output data of all out-edge neighbors of the current entity, and an action pruning mechanism and a beam search method are introduced in a reasoning process of the decision module; and the recommendation method can greatly improve recommendation efficiency and recommendation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of interpretable recommendation technology, specifically to a gated context interpretable recommendation method, system, computer device, and storage medium based on policy value networks. Background Technology

[0002] With the explosive growth of internet information, accurate and explainable recommendation services have become a core requirement for connecting users with massive amounts of knowledge. Explainable recommendations not only improve user satisfaction and system credibility but also provide clear decision-making basis for recommendation results. Knowledge graphs, with their structured semantic representation capabilities, have become the mainstream technological carrier for explainable recommendations. By performing path reasoning on knowledge graphs, it is possible to generate reasoning paths from user entities to recommended items, thereby providing intuitive explanations for recommendation results.

[0003] Currently, most explainable recommendation models in existing technologies are based on knowledge graph path reasoning. These models perform multi-hop walks on the knowledge graph to find connected paths from user entities to target items and use these paths as the recommendation explanation. However, existing explainable recommendation models have several shortcomings. First, knowledge graphs inevitably contain a large number of noisy entities and relationships unrelated to user intent. Existing methods often simply concatenate or directly superimpose the original features of entities with the path context features when extracting temporal context features from the reasoning path, lacking an effective dynamic fusion mechanism. This leads to semantic drift during long-path reasoning, deviating from the user's true intent. Second, when expanding nodes at each reasoning step, the current entity usually has a large number of outgoing neighbors. Existing methods mostly select directly from the entire action space, resulting in huge computational overhead and introducing a large number of irrelevant neighbors, interfering with the recommendation model's optimal decision-making. Therefore, existing explainable recommendation models based on knowledge graph path reasoning still have significant room for improvement in terms of recommendation efficiency and accuracy. Summary of the Invention

[0004] To address the shortcomings of low recommendation efficiency and accuracy in existing explainable recommendation models, this invention provides a gated context-interpretable recommendation method, system, computer device, and storage medium based on policy value networks.

[0005] To achieve the above objectives, the specific solution adopted by this invention is: a gated context-interpretable recommendation method based on a policy value network, comprising: Receive user recommendation requests and parse the recommendation requests to obtain the starting entity and intent features; The initial entity and intent features are input into a pre-trained recommendation model to obtain recommendation results and corresponding recommendation explanations. The recommendation model includes a gated context knowledge graph embedding module and a decision module. The decision module includes a policy network. The recommendation model performs reasoning methods including: Using the gated context knowledge graph embedding module to obtain the reasoning first The original features of the current entity and the temporal context features of the reasoning path taken by the starting entity to reach the current entity are used to obtain the fused features. When the value is 1, the current entity is the starting entity. When the value is greater than 1, the current entity is the end entity of the previous reasoning step; A semantic scoring function is constructed based on fusion features to evaluate the degree of fit between fusion features and intent features in the semantic space. ; The policy network is used to process the fusion features to obtain the original output data of all outgoing neighbors of the current entity; Using semantic scoring function Calculate the semantic score of each outgoing edge neighbor and sort the semantic scores in descending order to obtain the semantic score set; A method for retaining the first preset number based on the semantic score set is constructed. The action mask of the neighbor outside the boundary. Mask the action Applying this to the original output data yields the action probabilities of each outgoing neighbor. The comprehensive score for each reasoning path is calculated based on action probability and semantic score, and beam search is used to retain the second preset number of results before the comprehensive score is obtained. One reasoning path; When the preset convergence condition is met, the recommended item is output as the recommendation result, and the reasoning path from the starting entity to the recommended item is used as the recommendation explanation.

[0006] As an optimization of the aforementioned gated context-interpretable recommendation method based on policy value networks: the gated context knowledge graph embedding module includes a shared embedding layer, a feature extraction layer, and a gated fusion layer. The shared embedding layer includes an entity embedding matrix pre-trained on the knowledge graph using the TransE algorithm. The feature extraction layer includes a CoKE encoder. The gated fusion layer includes dynamic gating coefficients constructed based on the importance of the original features and temporal context features. ; The processing procedure of the gating context knowledge graph embedding module is as follows: The original features of the current entity are obtained from the entity embedding matrix by using the shared embedding layer based on the unique index ID of the current entity in the knowledge graph; Temporal context features are obtained by using the CoKE encoder in the feature extraction layer to extract the inference path from the starting entity to the current entity; Using a gating fusion layer based on dynamic gating coefficients The original features and temporal context features are fused to obtain the fused features.

[0007] As an alternative optimization of the aforementioned policy value network-based gating context-interpretable recommendation method: the gating fusion layer utilizes dynamic gating coefficients. Methods for fusing original features and temporal context features to obtain fused features include: using a fusion function to fuse the original features and temporal context features, where the fusion function is: ; ; in, For the reasoning of the first The fusion characteristics of the steps For dynamic gating coefficients, For Hadama accumulation, These are the original features of the current entity. The temporal context features of the reasoning path traversed by the starting entity to the current entity. It is the Sigmoid activation function. Here is the weight matrix of the gated network. For the bias term of the gated network, This is a vector concatenation operation.

[0008] As an alternative optimization of the above-mentioned gated context-interpretable recommendation method based on policy value network: the policy network includes three fully connected layers and a ReLU nonlinear activation function arranged sequentially; The methods by which the policy network processes the fused features to obtain the raw output data of all outgoing neighbors of the current entity include: The fused features are sequentially passed through three fully connected layers and a ReLU nonlinear activation function to transform the features and obtain the original output data of the outgoing neighbors.

[0009] As an alternative optimization of the aforementioned gated context-interpretable recommendation method based on policy value networks: the semantic scoring function for: ; in, For the reasoning of the first A semantic score of the degree of fit between the fusion features and intent features of a step in the semantic space. For the reasoning of the first The fusion characteristics of the steps The original features of the starting entity, It is a learnable projection matrix.

[0010] As an alternative optimization to the aforementioned policy value network-based gated context-interpretable recommendation method: the action mask for: ; in, This is the action mask value. These are the outgoing neighbors of the current entity.

[0011] As an alternative optimization of the aforementioned gated context-interpretable recommendation method based on policy value networks: the method for calculating the comprehensive score of each inference path based on action probability and semantic score includes: based on a comprehensive score function. To calculate the overall score for each reasoning path, the overall score function is... for: ; in, For action The overall score, In the current fusion state Next action The probability, This is the adjustment coefficient.

[0012] A gated context-interpretable recommendation system based on policy value networks includes a data processing module and a data display module; The data processing module is used to use a pre-trained recommendation model to reason about the initial entity and intent features to obtain recommendation results and corresponding recommendation explanations; The data display module is used to show the recommendation results and the corresponding explanations.

[0013] Computer equipment, including memory and processor; Memory, used to store computer programs; A processor is used to read and execute computer programs to implement the aforementioned gated context-interpretable recommendation method based on policy value networks.

[0014] A storage medium for storing a computer program that, when executed, implements the aforementioned gated context-interpretable recommendation method based on a policy value network.

[0015] Compared with existing technologies, this invention has the following advantages: The recommendation model of this invention includes a gated context knowledge graph embedding module and a decision module. The gated context knowledge graph embedding module dynamically fuses the original features of the current entity with the temporal context features of the reasoning path to obtain fused features. The dynamic fusion process adaptively balances the importance of the original features and the temporal context features. When the path context information is rich and reliable, the influence of the temporal context features in the fused features is increased; when the path context information contains a lot of noise, the influence of the original features of the current entity in the fused features is increased. The inherent attributes of the current entity ensure the stability of the fused features, effectively avoiding the semantic drift problem in long-path reasoning. In the reasoning process of the decision module, a semantic scoring-based action pruning mechanism is introduced. At each step of reasoning, the semantic scores of all outgoing neighbors are calculated and sorted in descending order. Action masks are used to retain outgoing neighbors with high semantic scores for subsequent calculations. The action pruning mechanism can compress the action space, shield the interference of irrelevant nodes, and significantly improve the reasoning efficiency and recommendation accuracy of the recommendation model. Finally, to overcome the drawback of greedy search easily getting trapped in local optima, the recommendation model of this invention adopts beam search inference method for inference path selection. The inference path of beam search is calculated based on the action probability of out-edge neighbors and semantic score. The comprehensive score is used as the basis for path selection. Beam search can retain multiple high-quality inference paths, ensuring that the final output recommendation result is both accurate and interpretable. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the recommended method of the present invention; Figure 2 This is a schematic diagram of the structure of the recommended model of this invention; Figure 3 This is a schematic diagram of the structure of the gating context knowledge graph embedding module of the present invention; Figure 4 This is a schematic diagram of the decision-making module of the present invention; Figure 5 This is the trend of the recommendation model of this invention under different pruning action space sizes on the Clothing dataset; Figure 6 This shows the changing trend of the recommended model of this invention under different pruning action space sizes on the Beauty dataset. Detailed Implementation

[0017] The technical solution of the present invention will be further described in detail below with reference to specific embodiments. Parts not described or disclosed in detail in the following embodiments of the present invention should be understood as prior art known or should be known by those skilled in the art.

[0018] like Figures 1 to 4 As shown, the present invention provides a gated context-interpretable recommendation method based on a policy value network, including steps S1 to S2.

[0019] S1. Receive the user's recommendation request and parse it to obtain the starting entity and intent features. Entity recognition is performed on the recommendation request to obtain the starting entity, which serves as the starting point for subsequent reasoning. Semantic encoding is performed on the text fragments in the recommendation request other than the starting entity to obtain intent features, which are used to characterize the user's preferences and needs.

[0020] S2. Input the initial entity and intent features into a pre-trained recommendation model (Policy-Guided Gated Contextual Recommendation, PG-GCR) to obtain recommendation results and corresponding explanations. The recommended item is used as the recommendation result, and the reasoning path from the initial entity to the recommended item is used as the explanation. The recommendation model includes a gated contextual knowledge graph embedding module and a decision module. The decision module includes a policy network. The reasoning methods of the recommendation model include S21 to S23.

[0021] S21. Utilize the gated context knowledge graph embedding module to obtain the reasoning... The original features of the current entity and the temporal context features of the reasoning path taken by the starting entity to reach the current entity are used to obtain the fused features. When the value is 1, the current entity is the starting entity. When the value is greater than 1, the current entity is the terminal entity of the previous inference step. The gated context knowledge graph embedding module includes a shared embedding layer, a feature extraction layer, and a gated fusion layer. The shared embedding layer includes an entity embedding matrix obtained by pre-training the knowledge graph using the TransE algorithm. The feature extraction layer includes a CoKE encoder. The gated fusion layer includes dynamic gating coefficients constructed based on the importance of the original features and temporal context features. .

[0022] The processing procedure of the gating context knowledge graph embedding module is as follows: The original features of the current entity are retrieved from the entity embedding matrix using the shared embedding layer based on the unique index ID of the current entity in the knowledge graph. The calculation formula is as follows: ; in, These are the original features of the current entity. For entity embedding matrix, The unique index ID of the current entity in the knowledge graph. It is a d-dimensional spatial vector.

[0023] The CoKE encoder in the feature extraction layer is used to extract temporal context features from the inference path from the starting entity to the current entity. Specifically, each entity and relation in the inference path is mapped to a corresponding dense vector, and a learnable positional embedding matrix is ​​superimposed to preserve the sequential information of the inference path. The input matrix of the CoKE encoder is: ; in, This is the input matrix of the CoKE encoder. For entity embedding matrix, For entities or relations in the reasoning path, The learnable position embedding matrix.

[0024] CoKE encoders include those consisting of A multi-head self-attention encoding structure is formed by stacking layers of Transformers, which encodes the input matrix. Input a multi-head self-attention encoding structure, at the... In the Transformer layer, the feature matrix output from the previous layer is... The query matrix is ​​mapped to three sets of learnable projection matrices respectively. Key matrix Value matrix The calculation formula is: ; in, For query matrix The corresponding learnable projection matrix, Key matrix The corresponding learnable projection matrix, Value matrix The corresponding learnable projection matrix.

[0025] Each attention head is normalized using the Softmax function. Then, the outputs of all attention heads are concatenated and processed through linear transformation, residual connections, layer normalization, and a feedforward neural network to obtain the [number of attention heads]. Layer output ,go through After the Transformer layer completes the encoding, the feature matrix is ​​extracted. The vector corresponding to the end of the sequence is used as the temporal context feature of the inference path, and the output formula is: ; in, Temporal context features of the reasoning path traversed by the starting entity to reach the current entity.

[0026] Using a gating fusion layer based on dynamic gating coefficients The original features and temporal context features are fused to obtain fused features. Specifically, a fusion function is used to fuse the original features and temporal context features. The fusion function is as follows: ; ; in, For the reasoning of the first The fusion characteristics of the steps For dynamic gating coefficients, For Hadama accumulation, These are the original features of the current entity. The temporal context features of the reasoning path traversed by the starting entity to the current entity. It is the Sigmoid activation function. For the learnable weight matrix of the gated network, For the learnable bias term of the gated network, This is a vector concatenation operation.

[0027] S22. The policy network is used to process the fused features to obtain the original output data of all outgoing neighbors of the current entity. The policy network includes three fully connected layers and a ReLU nonlinear activation function set sequentially. The method of using the policy network to process the fused features to obtain the original output data of all outgoing neighbors of the current entity includes: passing the fused features sequentially through three fully connected layers and a ReLU nonlinear activation function for feature transformation to obtain the original output data of the outgoing neighbors. The calculation formula is as follows: ; ; in, As a characteristic of action, In the fusion state Next action The corresponding original logits vector, i.e., the original output data. , The learnable weight matrix of the policy network, , This is the bias term for the policy network.

[0028] The decision-making module also includes a value network, which shares the same fusion feature as the policy network as input. The value network only operates during the training phase of the recommendation model and is used to evaluate the expected long-term return value of the current fusion state. , As a scalar, the value network is used to assist in updating the policy network during the training phase of the recommendation model, but it no longer participates in forward propagation during the inference phase of the recommendation model.

[0029] An action pruning mechanism is introduced during the inference stage of the recommendation model, and a semantic scoring function is constructed based on the fused features to evaluate the degree of fit between the fused features and the intent features in the semantic space. Semantic scoring function for: ; in, For the reasoning of the first A semantic score of the degree of fit between the fusion features and intent features of a step in the semantic space. For the reasoning of the first The fusion characteristics of the steps The original features of the starting entity, It is a learnable projection matrix.

[0030] Using semantic scoring function Calculate the semantic score of each outgoing edge neighbor and sort the semantic scores in descending order to obtain a semantic score set. Based on the semantic score set, construct a system to retain the first preset number of outgoing edge neighbors. The action mask of the neighbor outside the boundary. Action mask for: ; in, This is the action mask value. These are the outgoing neighbors of the current entity.

[0031] Action mask The original data used in the policy network output is processed and normalized using Softmax to obtain the action probabilities of each outgoing edge neighbor. The calculation formula is as follows: ; in, To apply an action mask Subsequently, in the current fusion characteristics Select action The probability of an action.

[0032] A beam search inference method was used to select the inference path, based on a comprehensive scoring function. Calculate the overall score for each reasoning path, and retain the second preset number of results before the overall score is reached. Each reasoning path, combined scoring function A comprehensive scoring function is constructed based on action probability and semantic scoring. for: ; in, For action The overall score, In the current fusion state Select action The probability of the action, This is the adjustment coefficient.

[0033] In each step of reasoning, based on action The overall score is retained before This reasoning path effectively overcomes the drawback of greedy search, which is prone to getting trapped in local optima.

[0034] S23. When the preset convergence condition is met, output the recommended item as the recommendation result, and use the reasoning path from the starting entity to the recommended item as the recommendation explanation. The preset convergence condition is to reach the preset maximum number of reasoning steps or to find the target recommended item.

[0035] It should be noted that the principles of the TransE algorithm and the structure and principles of Transformer are conventional existing technologies in this field, and will not be elaborated further.

[0036] During the training phase, in order to encourage the recommendation model to explore the knowledge graph comprehensively and overcome the bias introduced by a single heuristic reward, the recommendation model in the first... Mixed rewards obtained from step-by-step reasoning It consists of four parts, a multi-objective function, and a mixed reward. The calculation formula is: ; ; ; ; in, For mixed rewards, It serves as a terminal reward, used to measure the success or failure of reasoning tasks. for The weighting coefficients, As a potential energy difference reward, for The weighting coefficients, To explore diverse rewards, for The weighting coefficients, For the first The current entity of the step, Recommend items for the target. This represents the number of times an entity is accessed during the training process. As a discount factor, For the reasoning of the first A semantic score of the degree of fit between the fusion features and intent features of a step in the semantic space. The path length penalty is typically a negative constant.

[0037] The total loss function of the recommendation model during the training phase It consists of four parts, the total loss function for: ; ; ; ; in, For policy network loss, For value network loss, For entropy regularization, For gating regularization terms, for The weighting coefficients, for The weighting coefficients, for The weighting coefficients, In the fusion state Take action below Advantages relative to the average level For the parameters of the value network, For parameters Value network estimate, For mixed rewards, This represents the maximum number of steps in the recommendation model's inference path. The feature dimension of the gated vector. In the reasoning of the first At that time, dynamic gating coefficient The The values ​​of each dimension.

[0038] For training the recommendation model, this invention uses the AdamW optimizer with an initial learning rate of 0.0001, a batch size of 32, an entropy regularization weight of 0.001, and 50 training rounds.

[0039] To further illustrate the performance of the recommendation model in recommendation tasks, four evaluation metrics—Normalized Discount Cumulative Gain (NDCG), Recall, Hit Rate (HR), and Precision—are used to evaluate the performance of the recommendation model.

[0040] The performance of the PG-GCR model of this invention is compared with other existing recommendation models on three public datasets. Table 1 shows the performance of the three public datasets with different features.

[0041]

[0042] Table 1. Amazon Recommender System Dataset Information Table 2 shows the performance comparison of the PG-GCR model with several baseline methods on the three public datasets mentioned above. These baselines include mainstream latent factor models, multimodal recommendation models, and knowledge graph reasoning models.

[0043] Table 2 Comparison of recommendation performance of each model on three public datasets

[0044] It's worth noting that on the Cell Phones dataset, which has dense logical relationships, its HR (Reward Hierarchy) reached an excellent 13.356%. The key to this cross-scenario stability lies in the introduction of a hybrid reward mechanism, effectively overcoming the reward sparsity problem in long-path inference. Compared to the strongest baseline model PGPR, which relies solely on termination soft rewards, PG-GCR obtains continuous and dense gradient signals at every intermediate step of path search, precisely guiding its efficient planning of the optimal path to the target item through a continuous signal chain.

[0045] Furthermore, on the relatively sparse Clothing dataset, PG-GCR still achieves an NDCG of 2.945%, while on the Beauty dataset, its NDCG and HR reach 5.912% and 15.602%, respectively, both showing significant improvements over baseline methods. These results demonstrate that introducing a gated contextual knowledge graph embedding module enables the recommendation model to possess adaptive filtering capabilities, dynamically filtering out noise information inconsistent with the current path during inference, thereby achieving more accurate entity navigation.

[0046] Overall, PG-GCR maintains a stable performance advantage and high inference accuracy in general recommendation scenarios. Experimental results verify that the synergistic effect between potential reward shaping and gating state awareness significantly enhances the recommendation model's ability to perceive and capture multi-hop logical relationships in knowledge graphs.

[0047] To evaluate the effectiveness of each core module of this invention, a module ablation experiment was designed on the Cell Phones dataset. The model PG-GCR with the gated context knowledge graph embedding module removed, the model PG-GCR with the potential reward mechanism removed, and the complete recommendation model of this invention were constructed and compared. The results of the ablation experiment are shown in Table 3.

[0048] Table 3 Ablation Experiments of Core Modules

[0049] Without the gated context knowledge graph embedding module, the model's NDCG and Recall dropped to 5.258% and 8.847%, respectively, significantly lower than the 5.684% and 9.512% of the complete PG-GCR model. Its HR and Precision also showed a similar downward trend. This result indicates that the gated context knowledge graph embedding module is crucial for improving the state representation capability of PG-GCR. Through the gating mechanism, this module can effectively filter noise information in the inference path and capture long-distance semantic dependencies, enabling the agent to accurately determine the next hop direction based on rich context, thereby improving the accuracy of path reasoning.

[0050] Similarly, in the absence of a potential energy reward mechanism, the model's NDCG, Recall, HR, and Precision were 5.487%, 9.213%, 12.946%, and 1.398%, respectively, also lower than the performance of the complete PG-GCR model. This indicates that the potential energy reward mechanism plays a crucial guiding role in the policy optimization process of reinforcement learning. The potential energy function can smooth the sparse reward space and, by providing continuous intermediate feedback signals, help the agent overcome the reward sparsity problem, thereby approaching the target item more efficiently and optimizing the overall path search process.

[0051] To evaluate the impact of the size of the action space after pruning on the recommendation performance of the recommendation model of this invention, such as... Figure 5 , Figure 6 As shown, comparative experiments were conducted on two public datasets, Clothing and Beauty. The size of the pruned action space was gradually increased from 100 to 500 with a step size of 50, and the performance was compared with the existing state-of-the-art baseline model.

[0052] Experimental results show that the PG-GCR model of this invention significantly outperforms the baseline model in all four evaluation metrics: NDCG, Recall, HR, and Precision. While the performance of the baseline model continuously declines as the action space expands, the PG-GCR model of this invention, although exhibiting slight fluctuations, maintains a consistently high level. This demonstrates that the action pruning mechanism of this invention effectively filters out noisy actions unrelated to user intent, maintaining high recommendation accuracy while significantly reducing computational load. Furthermore, the PG-GCR model possesses excellent robustness and anti-interference capabilities, maintaining stable inference performance even when the action space expands and introduces more noise. It is suitable for scenarios requiring high logical accuracy and where the graph structure is sparse or noisy.

[0053] The present invention also provides a gated context-explainable recommendation system based on a policy value network, including a data processing module and a data display module; The data processing module is used to use a pre-trained recommendation model to reason about the initial entity and intent features to obtain recommendation results and corresponding recommendation explanations; The data display module is used to display the recommendation results and the corresponding recommendation explanations; Computer equipment, including memory and processor; Memory, used to store computer programs; A processor is used to read and execute computer programs to implement the aforementioned gated context-interpretable recommendation method based on policy value networks.

[0054] Finally, the present invention provides a storage medium for storing a computer program that, when executed, implements the above-described gated context-interpretable recommendation method based on a policy value network.

[0055] Memory, as a carrier of resources, can be read-only memory, random access memory, disk, or optical disk, etc. The resources stored on it can include operating systems, computer programs, etc., and the storage method can be temporary or permanent storage. The processor can be a general-purpose processor product based on architectures such as x86, IA64, RISC, MIPS, and ARM.

[0056] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A gated context-interpretable recommendation method based on policy value networks, characterized in that, include: Receive user recommendation requests and parse the recommendation requests to obtain the starting entity and intent features; The initial entity and intent features are input into a pre-trained recommendation model to generate recommendation results and corresponding explanations. The recommendation model includes a gated context knowledge graph embedding module and a decision module. The decision module includes a policy network. The reasoning methods of the recommendation model include: Using the gated context knowledge graph embedding module to obtain the reasoning first The original features of the current entity and the temporal context features of the reasoning path taken by the starting entity to reach the current entity are used to obtain the fused features. When the value is 1, the current entity is the starting entity. When the value is greater than 1, the current entity is the end entity of the previous reasoning step; A semantic scoring function is constructed based on fusion features to evaluate the degree of fit between fusion features and intent features in the semantic space. ; The policy network is used to process the fusion features to obtain the original output data of all outgoing neighbors of the current entity; Using semantic scoring function Calculate the semantic score of each outgoing edge neighbor and sort the semantic scores in descending order to obtain the semantic score set; A method for retaining the first preset number based on the semantic score set is constructed. The action mask of the neighbor outside the boundary. Mask the action Applying this to the original output data yields the action probabilities of each outgoing neighbor. The comprehensive score for each reasoning path is calculated based on action probability and semantic score, and beam search is used to retain the second preset number of results before the comprehensive score is obtained. One reasoning path; When the preset convergence condition is met, the recommended item is output as the recommendation result, and the reasoning path from the starting entity to the recommended item is used as the recommendation explanation.

2. The gated context-interpretable recommendation method based on policy value network according to claim 1, characterized in that, The gated context knowledge graph embedding module includes a shared embedding layer, a feature extraction layer, and a gated fusion layer. The shared embedding layer includes an entity embedding matrix pre-trained on the knowledge graph using the TransE algorithm. The feature extraction layer includes a CoKE encoder. The gated fusion layer includes dynamic gating coefficients constructed based on the importance of the original features and temporal context features. ; The processing procedure of the gating context knowledge graph embedding module is as follows: The original features of the current entity are obtained from the entity embedding matrix by using the shared embedding layer based on the unique index ID of the current entity in the knowledge graph; Temporal context features are obtained by using the CoKE encoder in the feature extraction layer to extract the inference path from the starting entity to the current entity; Using a gating fusion layer based on dynamic gating coefficients The original features and temporal context features are fused to obtain the fused features.

3. The gated context-interpretable recommendation method based on policy value network according to claim 2, characterized in that, The gating fusion layer utilizes dynamic gating coefficients. Methods for fusing original features and temporal context features to obtain fused features include: using a fusion function to fuse the original features and temporal context features, where the fusion function is: ; ; in, For the reasoning of the first The fusion characteristics of the steps For dynamic gating coefficients, For Hadama accumulation, These are the original features of the current entity. The temporal context features of the reasoning path traversed by the starting entity to the current entity. It is the Sigmoid activation function. Here is the weight matrix of the gated network. For the bias term of the gated network, This is a vector concatenation operation.

4. The gated context-interpretable recommendation method based on policy value network according to claim 1, characterized in that, The policy network comprises three fully connected layers arranged sequentially and a ReLU nonlinear activation function; The methods by which the policy network processes the fused features to obtain the raw output data of all outgoing neighbors of the current entity include: The fused features are sequentially passed through three fully connected layers and a ReLU nonlinear activation function to transform the features and obtain the original output data of the outgoing neighbors.

5. The gated context-interpretable recommendation method based on policy value network according to claim 1, characterized in that, The semantic scoring function for: ; in, For the reasoning of the first A semantic score of the degree of fit between the fusion features and intent features of a step in the semantic space. For the reasoning of the first The fusion characteristics of the steps The original features of the starting entity, It is a learnable projection matrix.

6. The gated context-interpretable recommendation method based on policy value network according to claim 1, characterized in that, The action mask for: ; in, This is the action mask value. These are the outgoing neighbors of the current entity.

7. The gated context-interpretable recommendation method based on policy value network according to claim 1, characterized in that, The method for calculating the comprehensive score of each reasoning path based on action probability and semantic scoring includes: based on a comprehensive scoring function. To calculate the overall score for each reasoning path, the overall score function is... for: ; in, For action The overall score, In the current fusion state Next action The probability, This is the adjustment coefficient.

8. A gated context-interpretable recommender system based on a policy value network, characterized in that, It includes a data processing module and a data display module; The data processing module is used to use a pre-trained recommendation model to reason about the initial entity and intent features to obtain recommendation results and corresponding recommendation explanations; The data display module is used to display the recommendation results and the corresponding explanations.

9. A computer device, characterized in that, Including memory and processor; Memory, used to store computer programs; A processor for reading and executing computer programs to implement a gated context-interpretable recommendation method based on a policy value network as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, Used to store a computer program, which, when executed, implements a gated context-interpretable recommendation method based on a policy value network as described in any one of claims 1 to 7.