US 12,292,938 B2
Conversation-based recommending method, conversation-based recommending apparatus, and device
Tianjian He, Beijing (CN); Yi Liu, Beijing (CN); Daxiang Dong, Beijing (CN); Dianhai Yu, Beijing (CN); and Yanjun Ma, Beijing (CN)
Assigned to BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD., Beijing (CN)
Filed by BEIJING BAIDU NETCOM SCIENCE AND TECHNOLOGY CO., LTD., Beijing (CN)
Filed on Aug. 10, 2021, as Appl. No. 17/399,016.
Claims priority of application No. 202010996994.2 (CN), filed on Sep. 21, 2020.
Prior Publication US 2021/0374356 A1, Dec. 2, 2021
Int. Cl. G06F 40/00 (2020.01); G06F 16/953 (2019.01); G06F 18/2323 (2023.01); G06F 18/2411 (2023.01); G06F 40/35 (2020.01)
CPC G06F 16/953 (2019.01) [G06F 18/2323 (2023.01); G06F 18/2411 (2023.01); G06F 40/35 (2020.01)] 18 Claims
OG exemplary drawing
 
1. A conversation-based recommending method, comprising:
obtaining a directed graph corresponding to a current conversation, the current conversation comprising clicked items, the directed graph comprising nodes and directed edges between the nodes, each node corresponding to a clicked item, and each directed edge indicating relationship data between the nodes;
for each node of the directed graph, determining an attention weight for each directed edge corresponding to the node based on a feature vector of the node and the relationship data;
for each node of the directed graph, determining a new feature vector of the node based on the relationship data and the attention weight of each directed edge;
determining a feature vector of the current conversation based on the new feature vector of each node; and
recommending an item based on the feature vector of the current conversation;
wherein determining the feature vector of the current conversation comprises:
obtaining a sorting order of the clicked items in the current conversation;
determining position information of each node in the directed graph based on the sorting order;
obtaining a position representation vector of each node by performing vector representation on the position information of the node;
determining a target feature vector of each node based on the position representation vector of the node and the new feature vector, and
determining the feature vector of the current conversation based on the target feature vector of each node.
 
8. An electronic device, comprising:
at least one processor; and
a memory, communicatively coupled to the at least one processor,
wherein the memory is configured to store instructions executable by the at least one processor, and when the instructions are executed by the at least one processor, the at least one processor is configured to:
obtain a directed graph corresponding to a current conversation, the current conversation comprising clicked items, the directed graph comprising nodes and directed edges between the nodes, each node corresponding to a clicked item, and each directed edge indicating relationship data between the nodes;
for each node of the directed graph, determine an attention weight for each directed edge corresponding to the node based on a feature vector of the node and the relationship data;
for each node of the directed graph, determine a new feature vector of the node based on the relationship data and the attention weight of each directed edge;
determine a feature vector of the current conversation based on the new feature vector of each node; and
recommend an item based on the feature vector of the current conversation;
wherein determining the feature vector of the current conversation comprises:
obtaining a sorting order of the clicked items in the current conversation;
determining position information of each node in the directed graph based on the sorting order;
obtaining a position representation vector of each node by performing vector representation on the position information of the node;
determining a target feature vector of each node based on the position representation vector of the node and the new feature vector, and
determining the feature vector of the current conversation based on the target feature vector of each node.