IP Library › Granted Patent US 12,038,989
Granted Patent B2
US 12,038,989 · App. 18/148,775 · Granted Jul 16, 2024

Methods for community search, method for training community search model, and electronic device

Inventors: Zheng Dong (Beijing, CN); Peng Wang (Beijing, CN); Xin Song (Beijing, CN); Hengshu Zhu (Beijing, CN); Kaichun Yao (Beijing, CN)
Assignee: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
G06F16/9536G06N3/092
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,038,989
App. No.
18/148,775
Granted
Jul 16, 2024
Kind
B2
Abstract

A method for community search is performed by an electronic device. The method includes: obtaining graph data to be processed, in which the graph data includes a plurality of nodes and a plurality of connection edges between the nodes; determining a query node from the plurality of nodes based on the graph data, and determining a target community to which the query node belongs by performing a community search for the query node, in which the target community includes the query node, and at least one node other than the query node in the plurality of nodes; and determining the query node and performing the community search for the query node repeatedly until the community to which each node included in the graph data belongs is determined.

Claims (61)

1. A method for community search in a network based on deep learning, performed by an electronic device, the method comprising:

obtaining graph data to be processed, wherein the graph data comprises a plurality of nodes and a plurality of connection edges between the nodes;

determining a query node from the plurality of nodes based on the graph data, and determining a target community to which the query node belongs by performing a community search for the query node, wherein the target community comprises the query node and at least one node other than the query node in the plurality of nodes; and

repeatedly performing the steps of determining the query node and performing the community search for the query node, until a community to which each node included in the graph data belongs is determined;

wherein determining the target community to which the query node belongs by performing the community search for the query node, comprises:

adding the query node to a first community, wherein the first community is an empty community;

determining, based on expression vectors corresponding to nodes contained in the first community and expression vectors corresponding to the first nodes, a prediction quality of the first community by the reinforcement learning network after the first nodes are added to the first community, wherein the first nodes are nodes other than the nodes contained in the first community in the plurality of nodes;

updating the first community by adding a target node in the first nodes to the first community,

wherein the target node is one of the first nodes that enables the highest prediction quality of the first community after being added into the first community; and

updating the first community repeatedly until the updated first community satisfies a preset end condition, and determining the updated first community as the target community.

2. The method of claim 1 , wherein determining the query node from the plurality of nodes, comprises:

determining an importance corresponding to each of the nodes;

obtaining, from the plurality of nodes, first nodes whose communities are not determined; and

determining a node with the highest importance from the first nodes as the query node.

3. The method of claim 2 , wherein determining the query node from the plurality of nodes based on the graph data, and determining the target community to which the query node belongs by performing the community search for the query node, comprises:

determining the query node from the plurality of nodes by inputting the graph data into a community search model; and

determining the target community to which the query node belongs by performing the community search for the query node.

4. The method of claim 3 , wherein the community search model comprises a graph neural network and a reinforcement learning network, and determining the query node from the plurality of nodes by inputting the graph data into the community search model, and determining the target community to which the query node belongs by performing the community search for the query node, comprises:

obtaining expression vectors corresponding to the plurality of nodes by inputting the graph data into the graph neural network;

determining the query node from the plurality of nodes by inputting the expression vectors corresponding to the plurality of nodes into the reinforcement learning network; and

determining the target community to which the query node belongs by performing the community search for the query node through the reinforcement learning network.

5. The method of claim 1 , wherein the preset end condition comprises at least one of: a degree of each node in the updated first community being at least a preset value, or a number of nodes contained in the updated first community reaching a preset number.

6. A method for training a community search model, performed by an electronic device, the method comprising:

obtaining training graph data, wherein the training graph data comprises a plurality of sample nodes and a plurality of connection edges between the sample nodes;

obtaining expression vectors corresponding to the plurality of sample nodes by inputting the training graph data into a graph neural network comprised in an initial community search model;

determining a query sample node from the plurality of sample nodes by inputting the expression vectors corresponding to the plurality of sample nodes into a reinforcement learning network comprised in the initial community search model, determining a sample community to which the query sample node belongs by performing a community search for the query sample node through the reinforcement learning network, and adjusting model parameters of the graph neural network and the reinforcement learning network during the community search through the reinforcement learning network, wherein the sample community comprises the query sample node and at least one sample node other than the query sample node in the plurality of sample nodes; and

obtaining a target community search model by determining the query sample node and adjusting the model parameters repeatedly until a sample community to which each sample node belongs included in the sample graph data is determined;

wherein adjusting the model parameters of the graph neural network and the reinforcement learning network during the community search, comprises:

obtaining a first true quality of a first sample community, wherein the first sample community comprises a sample query node;

determining, based on expression vectors corresponding to sample nodes contained in the first sample community and an expression vector corresponding to a first target sample node, a first prediction quality of the first sample community by the reinforcement learning network after the first target sample node is added to the first sample community, wherein the first target sample node is one of first sample nodes that enables the highest prediction quality of the first sample community after being added into the first sample community, and the first sample nodes are sample nodes other than the sample nodes contained in the first sample community in the plurality of sample nodes;

obtaining a second true quality of a second sample community, wherein the second sample community comprises at least the sample query node and the first target sample node;

determining, based on expression vectors corresponding to sample nodes contained in the second sample community and an expression vector corresponding to a second target sample node, a second prediction quality of the second sample community by the reinforcement learning network after the second target sample node is added to the second sample community, wherein the second target sample node is one of second sample nodes that enables the highest prediction quality of the second sample community after being added into the second sample community, and the second sample nodes are sample nodes other than the sample nodes contained in the second sample community in the plurality of sample nodes;

determining a loss value based on the first true quality, the second true quality, the first prediction quality, and the second prediction quality; and

adjusting the model parameters of the graph neural network and the reinforcement learning network based on the loss value.

7. An electronic device, comprising:

at least one processor; and

a memory configured to store instructions executable by the at least one processor,

when the instructions are executed by the at least one processor, the at least one processor is caused to:

obtain graph data to be processed, wherein the graph data comprises a plurality of nodes and a plurality of connection edges between the nodes;

determine a query node from the plurality of nodes based on the graph data, and determine a target community to which the query node belongs by performing a community search for the query node, wherein the target community comprises the query node and at least one node other than the query node in the plurality of nodes; and

determine the query node and perform the community search for the query node repeatedly until a community to which each node included in the graph data belongs is determined;

wherein the at least one processor is caused to:

add the query node to a first community, wherein the first community is an empty community;

determine, based on expression vectors corresponding to nodes contained in the first community and expression vectors corresponding to the first nodes, a prediction quality of the first community by the reinforcement learning network after the first nodes are added to the first community, wherein the first nodes are nodes other than the nodes contained in the first community in the plurality of nodes;

update the first community by adding a target node in the first nodes to the first community, wherein the target node is one of the first nodes that enables the highest prediction quality of the first community after being added into the first community; and

update the first community repeatedly until the updated first community satisfies a preset end condition, and determining the updated first community as the target community.

8. The electronic device of claim 7 , wherein the at least one processor is further caused to:

determine an importance corresponding to each of the nodes;

obtain, from the plurality of nodes, first nodes whose communities are not determined; and

determine a node with the highest importance from the first nodes as the query node.

9. The electronic device of claim 8 , wherein the at least one processor is further caused to:

determine the query node from the plurality of nodes by inputting the graph data into a community search model; and

determine the target community to which the query node belongs by performing the community search for the query node.

10. The electronic device of claim 9 , wherein the community search model comprises a graph neural network and a reinforcement learning network, and

the at least one processor is further caused to:

obtain expression vectors corresponding to the plurality of nodes by inputting the graph data into the graph neural network;

determine the query node from the plurality of nodes by inputting the expression vectors corresponding to the plurality of nodes into the reinforcement learning network; and

determine the target community to which the query node belongs by performing the community search for the query node through the reinforcement learning network.

11. The electronic device of claim 8 , wherein the preset end condition comprises at least one of: a degree of each node in the updated first community being at least a preset value, or a number of nodes contained in the updated first community reaching a preset number.

12. A non-transitory computer-readable storage medium having computer instructions stored thereon, wherein the computer instructions are configured to cause a computer to implement the method according to claim 1 .

13. A computer program product comprising computer programs, wherein when the computer programs are executed by a processor, the method according to claim 1 .

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 27, 2023
From: DONG, ZHENG; WANG, PENG; SONG, XIN; ZHU, HENGSHU; YAO, KAICHUN
To: BEIJING BAIDU NETCOM SCIENCE TECHNOLOGY CO., LTD.
Reel/Frame 062507/0387 →
Priority Claims (1)
CN 202210062376.X · Jan 19, 2022 · national
Continuity (1)
Related Publication 20230140148A1 · May 4, 2023