WO2018184305A1 - Group search method based on social network, device, server and storage medium - Google Patents

Group search method based on social network, device, server and storage medium Download PDF

Info

Publication number
WO2018184305A1
WO2018184305A1 PCT/CN2017/090571 CN2017090571W WO2018184305A1 WO 2018184305 A1 WO2018184305 A1 WO 2018184305A1 CN 2017090571 W CN2017090571 W CN 2017090571W WO 2018184305 A1 WO2018184305 A1 WO 2018184305A1
Authority
WO
WIPO (PCT)
Prior art keywords
group
user
node
social network
user node
Prior art date
Application number
PCT/CN2017/090571
Other languages
French (fr)
Chinese (zh)
Inventor
王健宗
黄章成
吴天博
肖京
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Priority to SG11201709902TA priority Critical patent/SG11201709902TA/en
Priority to US15/578,407 priority patent/US10268655B2/en
Priority to AU2017268599A priority patent/AU2017268599B2/en
Priority to EP17801323.1A priority patent/EP3608798A4/en
Priority to JP2017568053A priority patent/JP6608972B2/en
Publication of WO2018184305A1 publication Critical patent/WO2018184305A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/248Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Definitions

  • the present invention relates to the field of computer application technologies, and in particular, to a community network based group method, apparatus, server, and storage medium.
  • the traditional group search method first determines the possible combinations of all the nodes in the social network data according to the number of groups, and then filters all the combinations of the search through the other conditions of the group one by one, the calculation amount is very large, and the search efficiency is extremely low.
  • a social network based group search method and apparatus a server, and a storage medium are provided.
  • a social network based group search method comprising:
  • the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
  • the social The network map is generated according to social relationship data in a social networking website, the social network map including a plurality of user nodes and a set of edges for connecting the user nodes;
  • search expansion based on the user node corresponding to the query user identifier according to the social network map, and determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group a member until the determined number of the group members is equal to the group size;
  • the user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer.
  • a social network based group search device comprising:
  • a search request module configured to receive a group search request sent by the query terminal, where the group search request carries a specified query user identifier, a set group size, and a group check degree, where the group core Degree defines the minimum number of members of a group that are adjacent to other members;
  • a social network map retrieval module configured to retrieve a pre-generated social network map in response to the group search request, wherein the social network map is generated according to social relationship data in a social networking website, the social network
  • the figure includes a plurality of user nodes and a set of edges for connecting the user nodes;
  • a hierarchical search module configured to perform a search expansion of a set number of layers based on the user node corresponding to the query user identifier according to the social network map, and determine one in each search expansion layer in the social network map. Connecting a user node with the largest number of user nodes as a group member, so that the determined number of the group members meets the set group size;
  • the user node included in the first-level extension layer in the expansion process is an adjacent node of the query user, and the user node included in the next-level extension layer is the group member determined by the upper-level extension layer. Adjacent user nodes;
  • a group determining module configured to form the determined group member and the query user into a group to be searched
  • the group feedback module is configured to determine whether the group nuclearity of the to-be-searched group is not less than the set group nuclearity, and if yes, feed the to-be-searched group as a query result to the query terminal display.
  • a server comprising a memory and a processor, the memory storing computer executable instructions, the instructions being executed by the processor, causing the processor to perform the following steps:
  • the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
  • the social network map is generated according to social relationship data in a social networking website, the social network map including a plurality of user nodes and Connecting a set of edges of the user node;
  • search expansion based on the user node corresponding to the query user identifier according to the social network map, and determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group a member until the determined number of the group members is equal to the group size;
  • the user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer.
  • One or more non-volatile readable storage media storing computer-executable instructions, the computer-executable instructions being executed by one or more processors, such that the one or more processors perform the steps of:
  • the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
  • the social network map is generated according to social relationship data in a social networking website, the social network map including multiple uses a user node and a set of edges for connecting the user node;
  • search expansion based on the user node corresponding to the query user identifier according to the social network map, and determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group a member until the determined number of the group members is equal to the group size;
  • the user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer.
  • 1 is an application environment diagram of a social network-based group search method in an embodiment
  • FIG. 2 is a schematic diagram showing the internal structure of a server in an embodiment
  • FIG. 3 is a flow chart of a community network based group lookup method in an embodiment
  • 5A-5B are schematic diagrams of hierarchical search starting from a query user in an embodiment
  • 6A-6C are groups to be searched by hierarchical search in one embodiment
  • FIG. 7 is a flowchart of a social network graph node pruning in an embodiment
  • FIG. 8 is a schematic diagram of a social network graph node pruning in an embodiment
  • FIG. 9 is a flowchart related to group preference when there are a plurality of groups satisfying the query condition in one embodiment
  • FIG. 10 is a structural block diagram of a social network-based group search apparatus in an embodiment
  • FIG. 11 is a structural block diagram of a social network-based group search apparatus in another embodiment
  • FIG. 12 is a structural block diagram of a social network based group search apparatus in still another embodiment.
  • an application environment diagram of a community network-based group search method is provided, where the application environment map includes a query terminal 110 and a server 120.
  • the query terminal 110 can communicate with the server 120 over a network.
  • the query terminal 110 may be at least one of a smartphone, a tablet, a notebook, and a desktop computer, but is not limited thereto.
  • the server 120 may be an independent physical server or a server cluster composed of a plurality of physical servers.
  • the querying terminal 110 sends a group lookup request to the server 120, specifying the querying user, the group size, and the grouping degree.
  • the server 120 performs hierarchical search and expansion on the data source (social network map) based on the given group query requirements (group size and group verification) of the querying terminal, and each search expansion layer Determining a user node with the largest number of connected user nodes in the social network map as a group member, and ensuring the group size requirement in the determining process. After the group is initially determined, the determined group is verified by the verification. If the verification requirement is met, the group information corresponding to the found group is fed back to the query terminal.
  • group query requirements group size and group verification
  • a server 120 includes a processor coupled via a system bus, a non-volatile storage medium, an internal memory, and a network interface.
  • the non-volatile storage medium of the server 120 stores an operating system, a database, and at least one computer executable instruction.
  • the processor can be caused to perform a social network based group lookup method as shown in FIG.
  • the database is used to store data, such as storing social network maps and the like involved in the execution of the social network-based group search method.
  • the processor is used to provide computing and control capabilities to support the operation of the entire server 120.
  • the internal memory in the server provides a cached operating environment for operating systems, databases, and computer executable instructions in a non-volatile storage medium.
  • the network interface is used for communication connection with the query terminal 110.
  • the structure of the server shown in FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied.
  • the specific server may include Show more or fewer parts, or combine some parts, or have different part arrangements.
  • a social network-based group search method is provided.
  • the method is applicable to the server shown in FIG. 2, and specifically includes the following steps:
  • Step S202 Receive a group search request sent by the querying terminal, where the group search request carries the specified query user identifier, the set group size, and the group core degree, and the group check degree defines the group member adjacency. The minimum number of other members.
  • the query interface is displayed in the query terminal, and the query condition can be set in the query interface.
  • the query conditions include group size and group verification.
  • the group size refers to the number of group members; the group nuclearity refers to the minimum number of other group members in the adjacent group of each group member in the determined group member.
  • each group member in the figure is adjacent to at least 3 other group members, and therefore, the group has a group degree of 3.
  • the user can set the group size and group verification by inputting controls in the query interface.
  • you can also specify the query user through the query interface.
  • the query user is a specified group member, that is, a group member that must be included. For example, Alice in the example scenario is the query user.
  • the social networking site such as Weibo, MSN, etc.
  • the server will push the corresponding query user identifier to the terminal control corresponding to the querying user according to the selected social networking website. In order to enable the user to query the selection of the user identification through the terminal control.
  • the query user is the user ID of the querying end user in the selected database.
  • the selected social networking site is Weibo
  • the user identifier of the querying terminal is Litch.
  • the querying user is the identifier of Litch in Weibo, such as Litchsweety.
  • the user identity of the end user in the designated social networking site can be automatically queried by the registration identity information (eg, phone number, real name, identity number, etc.) in the registration information.
  • the registration identity information eg, phone number, real name, identity number, etc.
  • Step S204 Retrieving a pre-generated social network map in response to the group search request, wherein the social network map is generated according to social relationship data in the social networking website, where the social network map includes a plurality of user nodes and is used to connect the user nodes. Side set.
  • the social network map is generated based on social relationship data in a pre-designated social networking website.
  • a social relationship in a social networking site may be a relationship in which a friend relationship, a mutual interest, and the like are related to each other.
  • the two elements included in social relationships are the relationship between users and users.
  • the social network map generated according to the social relationship identifies the user through the node, and identifies the relationship between the users through the edge between the nodes.
  • FIG. 4 is a social network diagram.
  • a social network map generated based on social network-based social relationship data is a very large and complex social network image. According to the traditional practice, filtering out the groups that meet the query conditions will be a major project, which takes more time and larger computing resources.
  • the purpose of determining the central node by layer by layer is to quickly and accurately achieve the purpose of finding a group that satisfies the query condition, as detailed in the subsequent steps.
  • Step S206 Perform search expansion based on the user node corresponding to the user identifier according to the social network map, and determine, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group member, until The determined number of group members is equal to the group size, wherein the user node included in the first level expansion layer in the expansion process is the neighbor node of the query user, and the user node included in the next level expansion layer is determined by the upper level expansion layer. The user node to which the group member is adjacent.
  • the location of the query user identifier is located in the social network graph, and then the user node corresponding to the query user identifier is used as a starting point for hierarchical expansion to form an extended subgraph.
  • the user node included in the first extension layer of the extended sub-picture is a user node adjacent to the user node corresponding to the query user.
  • the user node included in the first extension layer is a node adjacent to the user node v4, which are respectively v2, v5, and v6.
  • the extended subgraph in Figure 5B is a node adjacent to the user node v4, which are respectively v2, v5, and v6.
  • one user node is determined as a group member among the user nodes included in the first extension layer. Specifically, determine the number of adjacent user nodes in the social network graph. Many nodes are members of the group. The number of neighboring nodes in the social network graph of the v2 user node in the first extension layer is 6; the number of neighboring nodes in the social network graph of the v5 user node is 7; the number of neighboring nodes in the social network graph of the v6 user node is 4 . Therefore, v5 is selected as a group member.
  • the user node corresponding to the new group member is used as the new central node to perform the next level of expansion. That is, v5 is used as a new central node to expand the second extension layer.
  • the user node included in the second extension layer is a user node adjacent to v5. It should be noted that the user node that has been determined to be a member of the group is not included in the new extension layer. As shown in FIG. 5B, although v4 is a node adjacent to v5, since v4 is a user node that has been determined to be a member of the group, the node v4 is not included in the second extension layer.
  • the user nodes included in the second extension layer are v1, v2, v3, v6, v7, and v9, respectively.
  • the node with the most adjacent nodes determined according to the second extension layer is v2 (the number of adjacent nodes is six), and therefore, it is determined that the node v2 is a group member.
  • the user nodes included in the third extension layer are v1, v8, v3, and v6, respectively.
  • the number of user nodes adjacent to v1, v8, v3, and v6 are: 3, 4, 4, and 4, respectively. Therefore, the determined group member can be v8 or v3 or v6.
  • Step S208 The determined group member and the query user are grouped into a group to be searched.
  • the determined to-be-searched group is ⁇ v4, v5, v2, v6 ⁇ or ⁇ v4, v5, v2, v3 ⁇ or ⁇ v4, v5, v2, v8 ⁇ .
  • a group network map of the group to be searched is constructed according to the determined relationship between the group members to be searched and the group members (the association relationship can be determined from the social relationship diagram).
  • FIGS. 6A, 6B, and 6C Group network diagrams such as ⁇ v4, v5, v2, v6 ⁇ , ⁇ v4, v5, v2, v3 ⁇ , ⁇ v4, v5, v2, v8 ⁇ are sequentially shown in FIGS. 6A, 6B, and 6C.
  • Step S210 It is determined whether the group nuclearity of the to-be-searched group is not less than the set group nuclearity, and if yes, the to-be-searched group is fed back to the query terminal as a query result.
  • the degree of ⁇ v4, v5, v2, v6 ⁇ is 3; the degree of ⁇ v4, v5, v2, v3 ⁇ is 2; The verinity of v4, v5, v2, v8 ⁇ is 1. If the group verifier specified by the query terminal is 3, ⁇ v4, v5, v2, v6 ⁇ is a group that satisfies the query condition. If the group specified by the query terminal is 2, then ⁇ v4, v5, v2, v6 ⁇ and ⁇ v4, v5, v2, v3 ⁇ A group that meets the query criteria. Push the group that meets the query criteria to the query terminal.
  • the social network-based group search method in this embodiment performs hierarchical expansion centering on the query user, and the adopted extension only depends on the connection relationship of each node in the social network data.
  • the expansion process is simple and fast, and it is not necessary to filter all the combinations that may be searched one by one, and the query efficiency is high.
  • the selected group members are members with higher degree of nuclearity, which ensures that the found groups have higher intimacy.
  • step S204 responding to the group search request, retrieving a pre-generated social network map generated according to social relationship data in the social networking website, the social network graph including a plurality of user nodes and After the step of connecting the edge set of the user node, the method further includes: performing pruning on the retrieved social network graph. Then, based on the pruned social network map, step S206 is performed: searching for the set number of layers according to the user node corresponding to the query user identifier according to the social network map, and determining a social layer in each search expansion layer.
  • the user node with the largest number of connected user nodes in the network diagram is used as the group member, so that the determined number of group members meets the set group size; wherein the user node included in the first level expansion layer in the expansion process is a query.
  • the user node is a neighboring node, and the user node included in the next-level extension layer is a user node adjacent to the group member determined by the upper-level extension layer.
  • the steps of performing pruning processing on the retrieved social network graph include:
  • Step S302 Construct a breadth-first search tree with the user node corresponding to the query user identifier as a root node, and the breadth-first search tree sequentially traverses all user nodes in the social network map from the query user identifier.
  • the breadth-first search starts from a certain vertex v0 of the graph, and after accessing v0, sequentially searches for each of the unvisited neighboring points w1, w2, ... that access v0. Then, sequentially search for each of the adjacent points that have not been accessed by accessing w1, the adjacent points of w2 that have not been accessed, .... That is, starting from v0, from the near to the far, the vertices that are in communication with the v0 path and whose path lengths are 1, 2, ... are accessed in order, until all the vertices in the connected graph are accessed once.
  • the breadth-first search BFS is constructed with the query user v1 as the root node, and FIG. 8(b) is the query user v1 based on the social network map. Breadth-first search tree.
  • Step S304 Determine, according to the constructed breadth-first search tree, the shortest society of each node to the querying user. Cross distance.
  • the social distance of each user node from the root node can be determined, and the social distance determined by the breadth-first search tree is the shortest social distance.
  • the shortest social distance of v2, v3, and v5 is 1
  • the shortest social distance of v4, v6, and v8 is 2
  • the shortest social distance of v7 is 3.
  • Step S306 Calculate the difference between the group size and the shortest social distance of each user node.
  • the user node whose difference is not greater than 1 is a pruning node, and the pruning node and the edge corresponding to the pruning node are removed in the social network graph. set.
  • the user node v7 with the shortest social distance of 3 Assuming that the specified group size is 4, for the user node v7 with the shortest social distance of 3, the difference between the group size 4 and the shortest social distance 3 is not more than 1, so the user node v7 is a pruning node. User nodes with a shortest social distance greater than 3 also belong to the pruning node.
  • Step S308 determining whether there is a user node that does not meet the nuclear degree requirement in the user node of the pruned social network map, and if yes, removing the user node that does not meet the verification requirement in the pruned social network map,
  • the social network map is updated after pruning.
  • the group's nuclearity is essentially the nuclearity of the group members. If the user node does not meet the requirements in the searched social network diagram, if it is proposed as a group member, its nuclearity in the group will be even less satisfactory. Therefore, it is necessary to socialize after pruning.
  • the user node in the network diagram performs a check of the core. If there is a user node in the social network diagram after the pruning that does not meet the verification requirement, the user node is pruned again.
  • the hierarchical expansion based on the pruned social network map will be simpler, and the generated extended subgraph will also be simplified, so that the group query is more efficient.
  • the social network-based group search method when the group that satisfies the query condition (group size and group verification) by the hierarchical expansion is multiple, the social network-based group search method further includes:
  • Step S402 determining, according to the social network map, an edge set between each group member in the to-be-searched group, the root According to the determined edge set, a group network diagram of each group to be queried is constructed by using a group member as a user node.
  • the group to be searched according to the hierarchical search may determine the member information of the group, and the group information may be determined according to the member information of the group and the social network map (if the pruning process is performed, the social network map after the pruning)
  • the relationship between group members A group node is used as a user node, and an association relationship between the group members generates an edge set between the user nodes, so that a group network map of the group to be searched is generated.
  • 6A, 6B, and 6C are determined to be found groups ⁇ v4, v5, v2, v6 ⁇ , ⁇ v4, v5, v2, v3 ⁇ , and ⁇ v4, respectively.
  • Step S404 Calculate the group intimacy of each group network map.
  • Calculating the group intimacy corresponding to each group to be searched according to the generated group network map First, calculate the intimacy between any two nodes in the group network diagram. The node intimacy of all possible combinations is then summed to obtain group intimacy.
  • the node intimacy of ⁇ v2, v6 ⁇ , ⁇ v2, v4 ⁇ , ⁇ v2, v5 ⁇ , ⁇ v4, v6 ⁇ , ⁇ v4, v5 ⁇ , ⁇ v5, v6 ⁇ is sequentially calculated, and then These 6 nodes are intimately summed to obtain a group group density.
  • N(u) represents the set of adjacent nodes of node u
  • the numerator adopts the co-neighbor of the node plus 1, mainly to avoid the case where there is an edge between the two nodes, but the intimacy is zero.
  • Co(G C ) ⁇ (v 2 , v 4 )+ ⁇ (v 2 ,v 5 )+ ⁇ (v 2 ,v 8 )+ ⁇ (v 4
  • Step S406 The group to be searched corresponding to the group network map with the highest intimacy is fed back to the query terminal as a query result.
  • the query result fed back to the query terminal is a group network map generated according to the association relationship between the group members and the group members in the social network map, as shown in FIG. 6A.
  • the verification degree of each determined group to be searched may also be calculated, if present, For the maximum degree of verification, the group with the highest degree of verification is fed back to the query terminal as the query result.
  • the group verdicts are 3, 2, and 1, respectively. If the group qualification of the query condition is 1, the three groups to be searched satisfy the query condition. At this time, the result is pushed according to the size of the group. That is, the group A to be searched with the highest group nuclearity is pushed to the inquiry terminal for display.
  • a social network-based group search apparatus includes:
  • the search requesting module 510 is configured to receive a group search request sent by the querying terminal, where the group search request carries the specified query user identifier, the set group size, and the group verification degree, wherein the group verification degree Limits the minimum number of group members that are adjacent to other members.
  • the social network map retrieval module 520 is configured to retrieve a pre-generated social network map according to the group search request, where the social network map is generated according to social relationship data in the social networking website, where the social network map includes a plurality of user nodes and The set of edges used to connect to the user node.
  • the hierarchical search module 530 is configured to perform a search expansion of the set number of layers according to the user node corresponding to the user identifier according to the social network map, and determine, in each search expansion layer, a maximum number of connected user nodes in the social network map. User node as a group member, so that the determined number of group members meets the set group size;
  • the user node included in the first-level extension layer in the expansion process is a neighboring node of the query user, and the user node included in the next-level extension layer is a user node adjacent to the group member determined by the upper-level extension layer.
  • the group determining module 540 is configured to form the determined group member and the query user into a group to be searched.
  • the group feedback module 550 is configured to determine whether the group verification degree of the to-be-searched group is not less than the set group verification degree, and if yes, feed the to-be-searched group as a query result to the query terminal display. .
  • the social network-based group search apparatus further includes:
  • a search tree construction module 610 configured to build a breadth-first search tree with the user node corresponding to the query user identifier as a root node, where the breadth-first search tree sequentially traverses all the social network maps from the query user identifier User node.
  • the shortest social distance calculation module 620 is configured to determine a shortest social distance from each user node to the root node according to the constructed breadth-first search tree.
  • the pruning module 630 is configured to calculate a difference between a group size and a shortest social distance of each user node, where the user node with a difference of not more than 1 is a pruning node, and the pruning node and the pruning are removed in the social network diagram.
  • the edge set associated with the node generates a social network map after pruning.
  • the pruning module 630 is further configured to: find, in the user node of the social network graph after the pruning, whether there is a user node whose node is less than the group nuclearity, wherein the node core The degree is the number of nodes adjacent to the user node, and if so, the found user node is removed from the pruned social network map, and the pruned social network map is updated.
  • the determined group to be searched is multiple; the social network-based group search device further includes:
  • a group network diagram construction module 710 configured to determine, according to the social network map, an edge set between each group member in the to-be-searched group, and use the group member as a user node according to the determined edge set Constructing a group network diagram of each of the groups to be queried;
  • the intimacy calculation module 720 is configured to calculate the intimacy of each group network map
  • the group feedback module 550 is further configured to feed back the to-be-searched group corresponding to the most intimate group network map as a query result to the query terminal display.
  • the group intimacy of the group network map is calculated as:
  • N(u) represents the set of neighbor nodes of node u
  • the network interface may be an Ethernet card or a wireless network card.
  • the above modules may be embedded in the hardware in the processor or in the memory in the server, or may be stored in the memory in the server, so that the processor calls the corresponding operations of the above modules.
  • the processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
  • the program may be stored in a storage medium of a computer system and executed by at least one processor in the computer system to implement a process comprising an embodiment of the methods as described above.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

Disclosed is a group search method based on a social network, comprising: receiving a group search request sent by a query terminal, wherein the group search request includes a query user identifier, a group size and a group nuclearity carried therein; retrieving a pre-generated social network graph; performing search expansion, taking as a start point a user node corresponding to the query user identifier in the social network graph, and determining, in each search expansion layer, a user node having the most user nodes connected thereto in the social network graph to be a group member, until the number of group members is equal to the group size, wherein first-level expansion layers being expanded are nodes adjoining a query user, and subsequent expansion layers are user nodes adjoining the group members determined in previous expansion layers; determining whether a nuclearity of a determined group to be searched is not less than the group nuclearity, and if so, using the group to be searched as a query result and feeding the same back to the query terminal for display.

Description

基于社交网络的群组查找方法、装置、服务器和存储介质Group search method, device, server and storage medium based on social network
本申请要求于2017年04月07日提交中国专利局、申请号为201710224884.2、发明名称为“基于社交网络的群组查找方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 200910224884.2, entitled "Community Network-Based Group Search Method and Apparatus", filed on April 7, 2017, the entire contents of which are incorporated by reference. In this application.
技术领域Technical field
本发明涉及计算机应用技术领域,特别是涉及一种基于社交网络的群组方法、装置、服务器和存储介质。The present invention relates to the field of computer application technologies, and in particular, to a community network based group method, apparatus, server, and storage medium.
背景技术Background technique
在线社交网络已经成为了人们生活中必不可少的一部分,并给社会网络分析带来了巨大的挑战。群体性是社交网络最重要的属性之一,基于社交网络研究群组性已逐渐成为趋势。Online social networking has become an indispensable part of people's lives and has brought enormous challenges to social network analysis. Group is one of the most important attributes of social networks, and research on grouping based on social networks has gradually become a trend.
在生活、工作中,我们经常需要从社交网络中查找群组以开展工作,筹备晚宴等。传统的群组查找方法首先根据群组人数确定社交网络数据中所有节点的可能组合,然后在通过群组的其他条件对查找的所有组合进行逐一筛选,计算量非常大,查找效率极低。In life and work, we often need to find groups from social networks to carry out work, prepare dinners and so on. The traditional group search method first determines the possible combinations of all the nodes in the social network data according to the number of groups, and then filters all the combinations of the search through the other conditions of the group one by one, the calculation amount is very large, and the search efficiency is extremely low.
发明内容Summary of the invention
根据本申请公开的各种实施例,提供一种基于社交网络的群组查找方法和装置、服务器和存储介质。According to various embodiments disclosed herein, a social network based group search method and apparatus, a server, and a storage medium are provided.
一种基于社交网络的群组查找方法,所述方法包括:A social network based group search method, the method comprising:
接收查询终端发送的群组查找请求,所述群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量;Receiving a group search request sent by the querying terminal, where the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交 网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集;Retrieving a pre-generated social network map in response to the group lookup request, wherein the social The network map is generated according to social relationship data in a social networking website, the social network map including a plurality of user nodes and a set of edges for connecting the user nodes;
根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;Performing search expansion based on the user node corresponding to the query user identifier according to the social network map, and determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group a member until the determined number of the group members is equal to the group size;
其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点;The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User node
将确定的所述群组成员和所述查询用户组成待查找群组;Forming the determined group member and the querying user into a group to be searched;
判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。Determining whether the group grading of the group to be searched is not less than the set group grading, and if yes, feeding the group to be searched as a query result to the query terminal for display.
一种基于社交网络的群组查找装置,所述装置包括:A social network based group search device, the device comprising:
查找请求模块,用于接收查询终端发送的群组查找请求,所述群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量;a search request module, configured to receive a group search request sent by the query terminal, where the group search request carries a specified query user identifier, a set group size, and a group check degree, where the group core Degree defines the minimum number of members of a group that are adjacent to other members;
社交网络图调取模块,用于响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集;a social network map retrieval module, configured to retrieve a pre-generated social network map in response to the group search request, wherein the social network map is generated according to social relationship data in a social networking website, the social network The figure includes a plurality of user nodes and a set of edges for connecting the user nodes;
层级查找模块,用于根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行设定层数的搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,以使确定的所述群组成员的数量满足所述设定的群组规模;a hierarchical search module, configured to perform a search expansion of a set number of layers based on the user node corresponding to the query user identifier according to the social network map, and determine one in each search expansion layer in the social network map. Connecting a user node with the largest number of user nodes as a group member, so that the determined number of the group members meets the set group size;
其中,在拓展过程中的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点;The user node included in the first-level extension layer in the expansion process is an adjacent node of the query user, and the user node included in the next-level extension layer is the group member determined by the upper-level extension layer. Adjacent user nodes;
群组确定模块,用于将确定的所述群组成员和所述查询用户组成待查找群组; a group determining module, configured to form the determined group member and the query user into a group to be searched;
群组反馈模块,用于判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。The group feedback module is configured to determine whether the group nuclearity of the to-be-searched group is not less than the set group nuclearity, and if yes, feed the to-be-searched group as a query result to the query terminal display.
一种服务器,包括存储器和处理器,所述存储器中存储有计算机可执行指令,所述指令被所述处理器执行时,使得所述处理器执行以下步骤:A server comprising a memory and a processor, the memory storing computer executable instructions, the instructions being executed by the processor, causing the processor to perform the following steps:
接收查询终端发送的群组查找请求,所述群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量;Receiving a group search request sent by the querying terminal, where the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集;Retrieving a pre-generated social network map in response to the group lookup request, wherein the social network map is generated according to social relationship data in a social networking website, the social network map including a plurality of user nodes and Connecting a set of edges of the user node;
根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;Performing search expansion based on the user node corresponding to the query user identifier according to the social network map, and determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group a member until the determined number of the group members is equal to the group size;
其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点;The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User node
将确定的所述群组成员和所述查询用户组成待查找群组;Forming the determined group member and the querying user into a group to be searched;
判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。Determining whether the group grading of the group to be searched is not less than the set group grading, and if yes, feeding the group to be searched as a query result to the query terminal for display.
一个或多个存储有计算机可执行指令的非易失性可读存储介质,所述计算机可执行指令被一个或多个处理器执行,使得所述一个或多个处理器执行以下步骤:One or more non-volatile readable storage media storing computer-executable instructions, the computer-executable instructions being executed by one or more processors, such that the one or more processors perform the steps of:
接收查询终端发送的群组查找请求,所述群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量;Receiving a group search request sent by the querying terminal, where the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用 户节点和用于连接所述用户节点的边集;Retrieving a pre-generated social network map in response to the group lookup request, wherein the social network map is generated according to social relationship data in a social networking website, the social network map including multiple uses a user node and a set of edges for connecting the user node;
根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;Performing search expansion based on the user node corresponding to the query user identifier according to the social network map, and determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group a member until the determined number of the group members is equal to the group size;
其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点;The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User node
将确定的所述群组成员和所述查询用户组成待查找群组;Forming the determined group member and the querying user into a group to be searched;
判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。Determining whether the group grading of the group to be searched is not less than the set group grading, and if yes, feeding the group to be searched as a query result to the query terminal for display.
本申请的一个或多个实施例的细节在下面的附图和描述中提出。本申请的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the present application are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description and appended claims.
附图说明DRAWINGS
图1为一个实施例中基于社交网络的群组查找方法的应用环境图;1 is an application environment diagram of a social network-based group search method in an embodiment;
图2为一个实施例中服务器的内部结构示意图;2 is a schematic diagram showing the internal structure of a server in an embodiment;
图3为一个实施例中基于社交网络的群组查找方法的流程图;3 is a flow chart of a community network based group lookup method in an embodiment;
图4为一个实施例中社交网络图;4 is a social network diagram in one embodiment;
图5A-5B为一个实施例中以查询用户为起始点的层级搜索原理图;5A-5B are schematic diagrams of hierarchical search starting from a query user in an embodiment;
图6A-6C为一个实施例中经层级搜索得到的待查找群组;6A-6C are groups to be searched by hierarchical search in one embodiment;
图7为一个实施例中社交网络图节点剪枝所涉及的流程图;7 is a flowchart of a social network graph node pruning in an embodiment;
图8为一个实施例中社交网络图节点剪枝的原理图;8 is a schematic diagram of a social network graph node pruning in an embodiment;
图9为一个实施例中当满足查询条件的群组为多个时,群组优选所涉及的流程图; FIG. 9 is a flowchart related to group preference when there are a plurality of groups satisfying the query condition in one embodiment;
图10为一个实施例中基于社交网络的群组查找装置的结构框图;10 is a structural block diagram of a social network-based group search apparatus in an embodiment;
图11为另一个实施例中基于社交网络的群组查找装置的结构框图;11 is a structural block diagram of a social network-based group search apparatus in another embodiment;
图12为又一个实施例中基于社交网络的群组查找装置的结构框图。FIG. 12 is a structural block diagram of a social network based group search apparatus in still another embodiment.
具体实施方式detailed description
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
如图1所示,在一个实施例中,提供了一种基于社交网络的群组查找方法的应用环境图,该应用环境图包括查询终端110、服务器120。查询终端110可通过网络与服务器120通信。查询终端110可以是智能手机、平板电脑、笔记本电脑、台式计算机中的至少一种,但并不局限于此。服务器120可以是独立的物理服务器,也可以是多个物理服务器构成的服务器集群。查询终端110向服务器120发送群组查找请求,指定查询用户、群组规模和群组核度。服务器120根据查询终端的给定的群组查询要求(群组规模和群组核度),以查询用户为中心对数据源(社交网络图)进行分层级搜索拓展,每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,在确定过程中保证群组规模要求。初步确定群组后,再对确定的群组进行核度验证,若满足核度要求,则将查找的群组对应的群组信息反馈至查询终端。As shown in FIG. 1 , in an embodiment, an application environment diagram of a community network-based group search method is provided, where the application environment map includes a query terminal 110 and a server 120. The query terminal 110 can communicate with the server 120 over a network. The query terminal 110 may be at least one of a smartphone, a tablet, a notebook, and a desktop computer, but is not limited thereto. The server 120 may be an independent physical server or a server cluster composed of a plurality of physical servers. The querying terminal 110 sends a group lookup request to the server 120, specifying the querying user, the group size, and the grouping degree. The server 120 performs hierarchical search and expansion on the data source (social network map) based on the given group query requirements (group size and group verification) of the querying terminal, and each search expansion layer Determining a user node with the largest number of connected user nodes in the social network map as a group member, and ensuring the group size requirement in the determining process. After the group is initially determined, the determined group is verified by the verification. If the verification requirement is met, the group information corresponding to the found group is fed back to the query terminal.
如图2所示,在一个实施例中,提供了一种服务器120,该服务器120包括通过系统总线连接的处理器、非易失性存储介质、内存储器和网络接口。其中,该服务器120的非易失性存储介质存储有操作系统、数据库和至少一条计算机可执行指令。该计算机可执行指令被处理器执行时,可使得处理器执行一种如图3所示的基于社交网络的群组查找方法。数据库用于存储数据,如存储该基于社交网络的群组查找方法执行过程中涉及的社交网络图等数据。处理器用于提供计算和控制能力,支撑整个服务器120的运行。服务器中的内存储器为非易失性存储介质中的操作系统、数据库和计算机可执行指令提供高速缓存的运行环境。网络接口用于与查询终端110进行通信连接。本领域技术人员可以理 解,图2中示出的服务器的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的服务器的限定,具体的服务器可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。As shown in FIG. 2, in one embodiment, a server 120 is provided that includes a processor coupled via a system bus, a non-volatile storage medium, an internal memory, and a network interface. The non-volatile storage medium of the server 120 stores an operating system, a database, and at least one computer executable instruction. When the computer executable instructions are executed by the processor, the processor can be caused to perform a social network based group lookup method as shown in FIG. The database is used to store data, such as storing social network maps and the like involved in the execution of the social network-based group search method. The processor is used to provide computing and control capabilities to support the operation of the entire server 120. The internal memory in the server provides a cached operating environment for operating systems, databases, and computer executable instructions in a non-volatile storage medium. The network interface is used for communication connection with the query terminal 110. Those skilled in the art can understand The structure of the server shown in FIG. 2 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the server to which the solution of the present application is applied. The specific server may include Show more or fewer parts, or combine some parts, or have different part arrangements.
如图3所示,在一个实施例中,提供了一种基于社交网络的群组查找方法,该方法可应用于如图2所示的服务器中,具体包括如下步骤:As shown in FIG. 3, in an embodiment, a social network-based group search method is provided. The method is applicable to the server shown in FIG. 2, and specifically includes the following steps:
步骤S202:接收查询终端发送的群组查找请求,群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,所述群组核度限定了群组成员邻接其他成员的最少的数量。Step S202: Receive a group search request sent by the querying terminal, where the group search request carries the specified query user identifier, the set group size, and the group core degree, and the group check degree defines the group member adjacency. The minimum number of other members.
查询终端中显示查询界面,在查询界面中用户可进行查询条件的设置。具体的,查询条件包括群组规模和群组核度。其中,群组规模是指群组成员的数量;群组核度是指确定的群组成员中每个群组成员邻接组内其他群组成员的数量的最小值。The query interface is displayed in the query terminal, and the query condition can be set in the query interface. Specifically, the query conditions include group size and group verification. The group size refers to the number of group members; the group nuclearity refers to the minimum number of other group members in the adjacent group of each group member in the determined group member.
在一个具体的场景中对查询条件进行解释:假设Alice想要举办一场规模为10人的晚宴活动(包括Alice在内),为了避免参与者之间太陌生使得晚宴期间太过冷清,Alice提出了以下查询要求:1)晚宴规模为10人(包括Alice在内);2)每个参与者至少认识其他3个参与者。要求1)即为群组规模,要求2)即为群组核度。Explain the query conditions in a specific scenario: Suppose Alice wants to host a dinner event for 10 people (including Alice), in order to avoid too strange between the participants, the dinner is too deserted, Alice proposed The following query requirements: 1) the size of the dinner is 10 (including Alice); 2) each participant knows at least 3 other participants. Requirement 1) is the group size, and requirement 2) is the group verification.
如图4为一个包括6个群组成员的群组,图中每个群组成员至少邻接3个其他群组成员,因此,该群组的群组核度为3。As shown in FIG. 4, a group consisting of 6 group members, each group member in the figure is adjacent to at least 3 other group members, and therefore, the group has a group degree of 3.
用户可通过查询界面中的输入控件设置群组规模和群组核度。除此之外,还可以通过查询界面指定查询用户。查询用户为指定的群组成员,即必须包括的群组成员。如举例场景中的Alice即为查询用户。The user can set the group size and group verification by inputting controls in the query interface. In addition, you can also specify the query user through the query interface. The query user is a specified group member, that is, a group member that must be included. For example, Alice in the example scenario is the query user.
在一个实施例中,在指定查询用户之前,需要设置查询的社交网站,如微博、MSN等。服务器将根据选定的社交网站,向查询用户对应的终端控件推送对应的查询用户标识。以使用户通过终端控件进行查询用户标识的选择。In one embodiment, the social networking site, such as Weibo, MSN, etc., needs to be set up before specifying the querying user. The server will push the corresponding query user identifier to the terminal control corresponding to the querying user according to the selected social networking website. In order to enable the user to query the selection of the user identification through the terminal control.
默认状态下,查询用户为查询终端用户在该选定的数据库中的用户标识。例如,选定的社交网站为微博,查询终端的用户标识为Litch,默认状态下,查询用户为Litch在微博中的标识,如Litchsweety。 By default, the query user is the user ID of the querying end user in the selected database. For example, the selected social networking site is Weibo, and the user identifier of the querying terminal is Litch. By default, the querying user is the identifier of Litch in Weibo, such as Litchsweety.
在一个实施例中,可通过注册信息中的注册身份信息(如电话号码、真实姓名、身份编号等)自动查询查询终端用户在指定社交网站中的用户标识。In one embodiment, the user identity of the end user in the designated social networking site can be automatically queried by the registration identity information (eg, phone number, real name, identity number, etc.) in the registration information.
步骤S204:响应于群组查找请求,调取预先生成的社交网络图,其中,社交网络图是根据社交网站中的社交关系数据生成的,社交网络图包括多个用户节点和用于连接用户节点的边集。Step S204: Retrieving a pre-generated social network map in response to the group search request, wherein the social network map is generated according to social relationship data in the social networking website, where the social network map includes a plurality of user nodes and is used to connect the user nodes. Side set.
社交网络图是根据预先指定的社交网站中的社交关系数据生成的。社交网站中的社交关系可以是好友关系、相互关注等彼此之间互相关联的关系。社交关系包括的两个要素分别是用户和用户之间的关联关系。根据社交关系生成的社交网络图通过节点标识用户,通过节点之间的边线标识用户之间的关系,图4即为一个社交网络图。The social network map is generated based on social relationship data in a pre-designated social networking website. A social relationship in a social networking site may be a relationship in which a friend relationship, a mutual interest, and the like are related to each other. The two elements included in social relationships are the relationship between users and users. The social network map generated according to the social relationship identifies the user through the node, and identifies the relationship between the users through the edge between the nodes. FIG. 4 is a social network diagram.
基于社交网站的社交关系数据生成的社交网络图是一个非常庞大且复杂的社交网络图像。按照传统做法,筛选出符合查询条件的群组将会是一个重大的工程,需要花费较多的时间和较大的计算资源。本实施例中,将以逐层确定中心节点的思想来又快又准确地达到查找到满足查询条件的群组的目的,具体详见后续步骤。A social network map generated based on social network-based social relationship data is a very large and complex social network image. According to the traditional practice, filtering out the groups that meet the query conditions will be a major project, which takes more time and larger computing resources. In this embodiment, the purpose of determining the central node by layer by layer is to quickly and accurately achieve the purpose of finding a group that satisfies the query condition, as detailed in the subsequent steps.
步骤S206:根据社交网络图以查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的群组成员的数量等于群组规模,其中,在拓展过程中的一级拓展层包括的用户节点为查询用户的邻接节点,下一级拓展层包括的用户节点为上一级拓展层确定的群组成员所邻接的用户节点。Step S206: Perform search expansion based on the user node corresponding to the user identifier according to the social network map, and determine, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group member, until The determined number of group members is equal to the group size, wherein the user node included in the first level expansion layer in the expansion process is the neighbor node of the query user, and the user node included in the next level expansion layer is determined by the upper level expansion layer. The user node to which the group member is adjacent.
首先,在社交网络图中定位到查询用户标识所在位置,然后以查询用户标识所对应的用户节点为起始点进行层级拓展,形成拓展子图。First, the location of the query user identifier is located in the social network graph, and then the user node corresponding to the query user identifier is used as a starting point for hierarchical expansion to form an extended subgraph.
具体的,拓展子图的第一拓展层所包括的用户节点为查询用户所对应的用户节点所邻接的用户节点。如图5A中的社交网络图所示,假设查询终端指定的查询用户是用户节点v4,那么,第一拓展层包含的用户节点为与用户节点v4邻接的节点,分别为v2、v5、v6,如图5B中的拓展子图。Specifically, the user node included in the first extension layer of the extended sub-picture is a user node adjacent to the user node corresponding to the query user. As shown in the social network diagram in FIG. 5A, assuming that the query user specified by the query terminal is the user node v4, the user node included in the first extension layer is a node adjacent to the user node v4, which are respectively v2, v5, and v6. The extended subgraph in Figure 5B.
确定第一拓展层中的用户节点后,在第一拓展层包括的用户节点中确定一个用户节点作为群组成员。具体的,确定在社交网络图中邻接用户节点数量最 多的节点作为群组成员。第一拓展层中的v2用户节点在社交网络图中的邻接节点数量是6;v5用户节点在社交网络图中的邻接节点数量是7;v6用户节点在社交网络图中的邻接节点数量是4。因此,选定v5为群组成员。After determining the user node in the first extension layer, one user node is determined as a group member among the user nodes included in the first extension layer. Specifically, determine the number of adjacent user nodes in the social network graph. Many nodes are members of the group. The number of neighboring nodes in the social network graph of the v2 user node in the first extension layer is 6; the number of neighboring nodes in the social network graph of the v5 user node is 7; the number of neighboring nodes in the social network graph of the v6 user node is 4 . Therefore, v5 is selected as a group member.
确定新的群组成员后,再以新的群组成员所对应的用户节点作为新的中心节点,进行下一层级拓展。也就是,以v5作为新的中心节点拓展第二拓展层。同样的,第二拓展层所包括的用户节点为v5邻接的用户节点。需要说明的是,新的拓展层中不包括已经确定为群组成员的用户节点。如图5B,虽然v4是v5邻接的节点,但由于v4是已经确定为群组成员的用户节点,所以第二拓展层中不包括节点v4。第二拓展层包括的用户节点分别为v1、v2、v3、v6、v7、v9。根据第二拓展层确定的邻接节点最多的节点是v2(邻接节点数量是6个),因此,确定节点v2为群组成员。After determining the new group member, the user node corresponding to the new group member is used as the new central node to perform the next level of expansion. That is, v5 is used as a new central node to expand the second extension layer. Similarly, the user node included in the second extension layer is a user node adjacent to v5. It should be noted that the user node that has been determined to be a member of the group is not included in the new extension layer. As shown in FIG. 5B, although v4 is a node adjacent to v5, since v4 is a user node that has been determined to be a member of the group, the node v4 is not included in the second extension layer. The user nodes included in the second extension layer are v1, v2, v3, v6, v7, and v9, respectively. The node with the most adjacent nodes determined according to the second extension layer is v2 (the number of adjacent nodes is six), and therefore, it is determined that the node v2 is a group member.
若指定的群组规模为4,则只需再确定最后一个群组成员即可,也就是拓展到第三拓展层即可。同理,第三拓展层包括的用户节点分别为v1、v8、v3、v6。在社交网络图中,v1、v8、v3、v6邻接的用户节点的数量分别为:3、4、4、4。因此,确定的群组成员可以是v8或v3或v6。If the specified group size is 4, then you only need to determine the last group member, that is, expand to the third extension layer. Similarly, the user nodes included in the third extension layer are v1, v8, v3, and v6, respectively. In the social network diagram, the number of user nodes adjacent to v1, v8, v3, and v6 are: 3, 4, 4, and 4, respectively. Therefore, the determined group member can be v8 or v3 or v6.
步骤S208:将确定的群组成员和查询用户组成待查找群组。Step S208: The determined group member and the query user are grouped into a group to be searched.
根据步骤S206,确定的待查找群组为{v4、v5、v2、v6}或者{v4、v5、v2、v3}或者{v4、v5、v2、v8}。According to step S206, the determined to-be-searched group is {v4, v5, v2, v6} or {v4, v5, v2, v3} or {v4, v5, v2, v8}.
根据确定的待查找群组成员以及群组成员之间的关联关系(该关联关系可从社交关系图中确定),构建待查找群组的群组网络图。A group network map of the group to be searched is constructed according to the determined relationship between the group members to be searched and the group members (the association relationship can be determined from the social relationship diagram).
如{v4、v5、v2、v6}、{v4、v5、v2、v3}、{v4、v5、v2、v8}的群组网络图依次如图6A、6B、6C所示。Group network diagrams such as {v4, v5, v2, v6}, {v4, v5, v2, v3}, {v4, v5, v2, v8} are sequentially shown in FIGS. 6A, 6B, and 6C.
步骤S210:判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。Step S210: It is determined whether the group nuclearity of the to-be-searched group is not less than the set group nuclearity, and if yes, the to-be-searched group is fed back to the query terminal as a query result.
确定待查找群组的核度,根据图6A-6C可清楚得到,{v4、v5、v2、v6}的核度为3;{v4、v5、v2、v3}、的核度为2;{v4、v5、v2、v8}的核度为1。若查询终端指定的群组核度为3,则{v4、v5、v2、v6}为满足查询条件的群组。若查询终端指定的群组核度为2,则{v4、v5、v2、v6}和{v4、v5、v2、v3} 为满足查询条件的群组。将满足查询条件的群组推送至查询终端。Determining the degree of the group to be searched, according to FIG. 6A-6C, the degree of {v4, v5, v2, v6} is 3; the degree of {v4, v5, v2, v3} is 2; The verinity of v4, v5, v2, v8} is 1. If the group verifier specified by the query terminal is 3, {v4, v5, v2, v6} is a group that satisfies the query condition. If the group specified by the query terminal is 2, then {v4, v5, v2, v6} and {v4, v5, v2, v3} A group that meets the query criteria. Push the group that meets the query criteria to the query terminal.
本实施例中的基于社交网络的群组查找方法以查询用户为中心进行层级拓展,所采用的拓展只需依赖社交网络数据中各节点的连接关系。拓展过程简单快捷,无需对查找可能的所有组合进行逐一筛选,查询效率高。另外,选取的群组成员均为核度较高的成员,可确保查找的群组具有较高的亲密度。The social network-based group search method in this embodiment performs hierarchical expansion centering on the query user, and the adopted extension only depends on the connection relationship of each node in the social network data. The expansion process is simple and fast, and it is not necessary to filter all the combinations that may be searched one by one, and the query efficiency is high. In addition, the selected group members are members with higher degree of nuclearity, which ensures that the found groups have higher intimacy.
在一个实施例中,在步骤S204:响应于群组查找请求,调取预先生成的社交网络图,社交网络图是根据社交网站中的社交关系数据生成的,社交网络图包括多个用户节点和用于连接用户节点的边集的步骤之后,还包括:对调取的社交网络图进行剪枝处理。然后,再基于剪枝后的社交网络图执行步骤S206:根据社交网络图以查询用户标识对应的用户节点为起始点进行设定层数的搜索拓展,在每个搜索拓展层中确定一个在社交网络图中连接用户节点数量最多的用户节点作为群组成员,以使确定的群组成员的数量满足设定的群组规模;其中,在拓展过程中的一级拓展层包括的用户节点为查询用户的邻接节点,下一级拓展层包括的用户节点为上一级拓展层确定的群组成员所邻接的用户节点。In an embodiment, in step S204: responding to the group search request, retrieving a pre-generated social network map generated according to social relationship data in the social networking website, the social network graph including a plurality of user nodes and After the step of connecting the edge set of the user node, the method further includes: performing pruning on the retrieved social network graph. Then, based on the pruned social network map, step S206 is performed: searching for the set number of layers according to the user node corresponding to the query user identifier according to the social network map, and determining a social layer in each search expansion layer. The user node with the largest number of connected user nodes in the network diagram is used as the group member, so that the determined number of group members meets the set group size; wherein the user node included in the first level expansion layer in the expansion process is a query. The user node is a neighboring node, and the user node included in the next-level extension layer is a user node adjacent to the group member determined by the upper-level extension layer.
具体的,如图7所示,对调取的社交网络图进行剪枝处理的步骤包括:Specifically, as shown in FIG. 7, the steps of performing pruning processing on the retrieved social network graph include:
步骤S302:以所述查询用户标识对应的用户节点为根节点构建广度优先搜索树,所述广度优先搜索树从所述查询用户标识开始依次遍历所述社交网络图中所有的用户节点。Step S302: Construct a breadth-first search tree with the user node corresponding to the query user identifier as a root node, and the breadth-first search tree sequentially traverses all user nodes in the social network map from the query user identifier.
广度优先搜索是从图的某个顶点v0出发,在访问v0之后,依次搜索访问v0的各个未被访问过的邻接点w1,w2,...。然后顺序搜索访问w1的各未被访问过的邻接点,w2的各未被访问过的邻接点,...。即从v0开始,由近至远,按层次依次访问与v0有路径相通且路径长度分别为1,2,...的顶点,直至连通图中所有顶点都被访问一次。The breadth-first search starts from a certain vertex v0 of the graph, and after accessing v0, sequentially searches for each of the unvisited neighboring points w1, w2, ... that access v0. Then, sequentially search for each of the adjacent points that have not been accessed by accessing w1, the adjacent points of w2 that have not been accessed, .... That is, starting from v0, from the near to the far, the vertices that are in communication with the v0 path and whose path lengths are 1, 2, ... are accessed in order, until all the vertices in the connected graph are accessed once.
根据图8(a)中的社交网络图,以查询用户v1为根节点构建广度优先搜索树(Breadth-First SearchBFS),图8(b)所示为根据社交网络图构建的基于查询用户v1的广度优先搜索树。According to the social network diagram in FIG. 8(a), the breadth-first search BFS is constructed with the query user v1 as the root node, and FIG. 8(b) is the query user v1 based on the social network map. Breadth-first search tree.
步骤S304:根据构建的广度优先搜索树确定每个节点到查询用户的最短社 交距离。Step S304: Determine, according to the constructed breadth-first search tree, the shortest society of each node to the querying user. Cross distance.
根据构建的广度优先搜索树可确定每个用户节点距离根节点(查询用户)的社交距离,广度优先搜索树确定的社交距离即为最短社交距离。如图8(b)所示,v2、v3和v5的最短社交距离为1,v4、v6、v8的最短社交距离为2,v7的最短社交距离为3。According to the constructed breadth-first search tree, the social distance of each user node from the root node (query user) can be determined, and the social distance determined by the breadth-first search tree is the shortest social distance. As shown in FIG. 8(b), the shortest social distance of v2, v3, and v5 is 1, the shortest social distance of v4, v6, and v8 is 2, and the shortest social distance of v7 is 3.
步骤S306:计算群组规模与每个用户节点的最短社交距离的差值,差值不大于1的用户节点为剪枝节点,在社交网络图中去除剪枝节点以及与剪枝节点对应的边集。Step S306: Calculate the difference between the group size and the shortest social distance of each user node. The user node whose difference is not greater than 1 is a pruning node, and the pruning node and the edge corresponding to the pruning node are removed in the social network graph. set.
假设指定的群组规模是4,对于最短社交距离为3的用户节点v7,群组规模4与最短社交距离3的差值不大于1,所以用户节点v7为剪枝节点。最短社交距离大于3的用户节点也属于剪枝节点。Assuming that the specified group size is 4, for the user node v7 with the shortest social distance of 3, the difference between the group size 4 and the shortest social distance 3 is not more than 1, so the user node v7 is a pruning node. User nodes with a shortest social distance greater than 3 also belong to the pruning node.
步骤S308:判断剪枝后的社交网络图的用户节点中是否存在不满足核度核度要求的用户节点,若是,则在剪枝后的社交网络图中去除不满足核度要求的用户节点,剪枝后对社交网络图进行更新。Step S308: determining whether there is a user node that does not meet the nuclear degree requirement in the user node of the pruned social network map, and if yes, removing the user node that does not meet the verification requirement in the pruned social network map, The social network map is updated after pruning.
由于查询条件中有对群组核度的要求,群组的核度实质上是群组成员的核度。若用户节点在查找的社交网络图中的核度不满足要求,若将其提出来作为群组成员,其在群组中的核度将更加不能满足要求,因此,需要对剪枝后的社交网络图中的用户节点进行核度检查,若剪枝后的社交网络图中存在不满足核度要求的用户节点,则再次对用户节点进行剪枝。Due to the requirement for group nuclearity in the query conditions, the group's nuclearity is essentially the nuclearity of the group members. If the user node does not meet the requirements in the searched social network diagram, if it is proposed as a group member, its nuclearity in the group will be even less satisfactory. Therefore, it is necessary to socialize after pruning. The user node in the network diagram performs a check of the core. If there is a user node in the social network diagram after the pruning that does not meet the verification requirement, the user node is pruned again.
假设查找的群组核度为3,对最短社交距离不满足条件的节点v7剪枝后,节点v8的核度为2,小于群组核度。因此,在剪枝后的社交网络图的基础上再次剪枝,去除节点v8。最终,剪枝后的社交网络图如图8(c)所示。It is assumed that the group verification of the search is 3, and after the node v7 that does not satisfy the condition that the shortest social distance does not satisfy the condition, the verinity of the node v8 is 2, which is smaller than the group ver. Therefore, the pruning is again performed on the basis of the pruned social network map, and the node v8 is removed. Finally, the social network diagram after pruning is shown in Figure 8(c).
基于剪枝后的社交网络图进行层级拓展将更加简单,生成的拓展子图也将简化,从而是群组查询效率更高。The hierarchical expansion based on the pruned social network map will be simpler, and the generated extended subgraph will also be simplified, so that the group query is more efficient.
在一个实施例中,如图9所示,通过层级拓展查找的满足查询条件(群组规模和群组核度)的群组为多个时,基于社交网络的群组查找方法还包括:In an embodiment, as shown in FIG. 9, when the group that satisfies the query condition (group size and group verification) by the hierarchical expansion is multiple, the social network-based group search method further includes:
步骤S402:根据社交网络图确定待查找群组中各群组成员之间的边集,根 据确定的边集以群组成员为用户节点构建每个待查询群组的群组网络图。Step S402: determining, according to the social network map, an edge set between each group member in the to-be-searched group, the root According to the determined edge set, a group network diagram of each group to be queried is constructed by using a group member as a user node.
根据层级搜索确定的待查找群组可以确定群组的成员信息,根据群组的成员信息和社交网络图(如有进行了剪枝处理,则应该是剪枝后的社交网络图)可确定群组成员之间的关联关系。将群组成员作为用户节点,群组成员之间的关联关系生成用户节点之间的边集,即可生成待查找群组的群组网络图。The group to be searched according to the hierarchical search may determine the member information of the group, and the group information may be determined according to the member information of the group and the social network map (if the pruning process is performed, the social network map after the pruning) The relationship between group members. A group node is used as a user node, and an association relationship between the group members generates an edge set between the user nodes, so that a group network map of the group to be searched is generated.
若设定的群组核度为1,则如图6A、6B、6C分别为确定的待查找群组{v4、v5、v2、v6}、{v4、v5、v2、v3}和{v4、v5、v2、v8}的群组网络图。If the set group verification is 1, then 6A, 6B, and 6C are determined to be found groups {v4, v5, v2, v6}, {v4, v5, v2, v3}, and {v4, respectively. Group network diagram for v5, v2, v8}.
步骤S404:计算每个群组网络图的群组亲密度。Step S404: Calculate the group intimacy of each group network map.
根据生成的群组网络图计算每个待查找群组所对应的群组亲密度。首先,计算在群组网络图中任意两节点之间的亲密度。再将所有的可能组合的节点亲密度加和得到群组亲密度。Calculating the group intimacy corresponding to each group to be searched according to the generated group network map. First, calculate the intimacy between any two nodes in the group network diagram. The node intimacy of all possible combinations is then summed to obtain group intimacy.
如图6A所示,依次计算{v2、v6}、{v2、v4}、{v2、v5}、{v4、v6}、{v4、v5}、{v5、v6}的节点亲密度,再将这6个节点亲密度加和得到群组群密度。As shown in FIG. 6A, the node intimacy of {v2, v6}, {v2, v4}, {v2, v5}, {v4, v6}, {v4, v5}, {v5, v6} is sequentially calculated, and then These 6 nodes are intimately summed to obtain a group group density.
具体的,节点亲密度的计算公式为:Specifically, the formula for calculating the node intimacy is:
给定一个网络图G=(V,E),节点u,v∈V且有(u,v)∈E,那么节点u,v之间的亲密度为:Given a network graph G = (V, E), nodes u, v ∈ V and (u, v) ∈ E, then the intimacy between nodes u, v is:
Figure PCTCN2017090571-appb-000001
Figure PCTCN2017090571-appb-000001
其中,N(u)表示节点u的邻接节点集合,节点u和v的共同邻接节点数为|N(u)∩N(v)|。在亲密度的计算中,分子采用节点的共同邻居加1,主要是为了避免两个节点之间存在边,而亲密度却为0的情况。Where N(u) represents the set of adjacent nodes of node u, and the number of adjacent nodes of nodes u and v is |N(u)∩N(v)|. In the calculation of intimacy, the numerator adopts the co-neighbor of the node plus 1, mainly to avoid the case where there is an edge between the two nodes, but the intimacy is zero.
一个网络图G=(V,E)的亲密度为其节点之间边的亲密度之和,记作Co(G)=∑(u,v)∈Eω(u,v)。The intimacy of a network graph G = (V, E) is the sum of the intimacy of the edges between its nodes, denoted as Co(G) = ∑ (u, v) ∈ E ω (u, v).
举例来说,图6A所示社交网络图的亲密度为Co(GA)=ω(v2,v4)+ω(v2,v5)+ω(v2,v6)+ω(v4,v5)+ω(v4,v6)+ω(v5,v6)=3/4+3/4+3/4+3/4+3/4+3/4=9/2;Co(GB)=ω(v2,v3)+ω(v2,v5)+ω(v2,v4)+ω(v4,v5)+ω(v4,v3)+ω(v5,v3)=1/2+3/4+1/2+1/2+3/2+1/2=17/4 Co(GC)=ω(v2,v4)+ω(v2,v5)+ω(v2,v8)+ω(v4,v5)+ω(v4,v8)+ω(v5,v8)=1/2+1/2+1/4+2/3+1+1=47/12; For example, the intimacy of the social network diagram shown in FIG. 6A is Co(G A )=ω(v 2 , v 4 )+ω(v 2 , v 5 )+ω(v 2 ,v 6 )+ω( v 4 ,v 5 )+ω(v 4 ,v 6 )+ω(v 5 ,v 6 )=3/4+3/4+3/4+3/4+3/4+3/4=9 /2; Co(G B )=ω(v 2 , v 3 )+ω(v 2 , v 5 )+ω(v 2 , v 4 )+ω(v 4 , v 5 )+ω(v 4 , v 3 )+ω(v 5 ,v 3 )=1/2+3/4+1/2+1/2+3/2+1/2=17/4 Co(G C )=ω(v 2 , v 4 )+ω(v 2 ,v 5 )+ω(v 2 ,v 8 )+ω(v 4 ,v 5 )+ω(v 4 ,v 8 )+ω(v 5 ,v 8 )= 1/2+1/2+1/4+2/3+1+1=47/12;
通过比较可知:Co(GA)>Co(GB)>Co(GC)。因此,向查询终端推送的群组是图6A所示群组。By comparison, it is known that Co(G A )>Co(G B )>Co(G C ). Therefore, the group pushed to the inquiry terminal is the group shown in FIG. 6A.
步骤S406:将亲密度最大的群组网络图对应的待查找群组作为查询结果反馈至查询终端显示。Step S406: The group to be searched corresponding to the group network map with the highest intimacy is fed back to the query terminal as a query result.
在一个实施例中,向查询终端反馈的查询结果为根据群组成员和群组成员在社交网络图中的关联关系生成的群组网络图,如图6A。In one embodiment, the query result fed back to the query terminal is a group network map generated according to the association relationship between the group members and the group members in the social network map, as shown in FIG. 6A.
在一个实施例中,当通过层级拓展查找的满足查询条件(群组规模和群组核度)的群组为多个时,还可以计算每个确定的待查找群组的核度,若存在最大核度,则将核度最大的待查找群组作为查询结果反馈至查询终端显示。如图6A-6C,群组核度分别为3、2、1。查询条件限定的群组核度为1,则三个待查找群组均满足查询条件,此时,根据群组核度的大小进行结果推送。也就是,将群组核度最大的待查找群组A推送至查询终端显示。In an embodiment, when the number of groups satisfying the query condition (group size and group verification) searched by the hierarchical expansion is plural, the verification degree of each determined group to be searched may also be calculated, if present, For the maximum degree of verification, the group with the highest degree of verification is fed back to the query terminal as the query result. As shown in Figures 6A-6C, the group verdicts are 3, 2, and 1, respectively. If the group qualification of the query condition is 1, the three groups to be searched satisfy the query condition. At this time, the result is pushed according to the size of the group. That is, the group A to be searched with the highest group nuclearity is pushed to the inquiry terminal for display.
在一个实施例中,如图10所示,提供了一种基于社交网络的群组查找装置,该装置包括:In an embodiment, as shown in FIG. 10, a social network-based group search apparatus is provided, and the apparatus includes:
查找请求模块510,用于接收查询终端发送的群组查找请求,群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量。The search requesting module 510 is configured to receive a group search request sent by the querying terminal, where the group search request carries the specified query user identifier, the set group size, and the group verification degree, wherein the group verification degree Limits the minimum number of group members that are adjacent to other members.
社交网络图调取模块520,用于响应于群组查找请求,调取预先生成的社交网络图,社交网络图是根据社交网站中的社交关系数据生成的,社交网络图包括多个用户节点和用于连接用户节点的边集。The social network map retrieval module 520 is configured to retrieve a pre-generated social network map according to the group search request, where the social network map is generated according to social relationship data in the social networking website, where the social network map includes a plurality of user nodes and The set of edges used to connect to the user node.
层级查找模块530,用于根据社交网络图以查询用户标识对应的用户节点为起始点进行设定层数的搜索拓展,在每个搜索拓展层中确定一个在社交网络图中连接用户节点数量最多的用户节点作为群组成员,以使确定的群组成员的数量满足设定的群组规模;The hierarchical search module 530 is configured to perform a search expansion of the set number of layers according to the user node corresponding to the user identifier according to the social network map, and determine, in each search expansion layer, a maximum number of connected user nodes in the social network map. User node as a group member, so that the determined number of group members meets the set group size;
其中,在拓展过程中的一级拓展层包括的用户节点为查询用户的邻接节点,下一级拓展层包括的用户节点为上一级拓展层确定的群组成员所邻接的用户节点。 The user node included in the first-level extension layer in the expansion process is a neighboring node of the query user, and the user node included in the next-level extension layer is a user node adjacent to the group member determined by the upper-level extension layer.
群组确定模块540,用于将确定的群组成员和查询用户组成待查找群组。The group determining module 540 is configured to form the determined group member and the query user into a group to be searched.
群组反馈模块550,用于判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。The group feedback module 550 is configured to determine whether the group verification degree of the to-be-searched group is not less than the set group verification degree, and if yes, feed the to-be-searched group as a query result to the query terminal display. .
在一个实施例中,如图11所示,基于社交网络的群组查找装置还包括:In an embodiment, as shown in FIG. 11, the social network-based group search apparatus further includes:
搜索树构建模块610,用于以所述查询用户标识对应的用户节点为根节点构建广度优先搜索树,所述广度优先搜索树从所述查询用户标识开始依次遍历所述社交网络图中所有的用户节点。a search tree construction module 610, configured to build a breadth-first search tree with the user node corresponding to the query user identifier as a root node, where the breadth-first search tree sequentially traverses all the social network maps from the query user identifier User node.
最短社交距离计算模块620,用于根据构建的广度优先搜索树确定每个用户节点到根节点的最短社交距离。The shortest social distance calculation module 620 is configured to determine a shortest social distance from each user node to the root node according to the constructed breadth-first search tree.
剪枝模块630,用于计算群组规模与每个用户节点的最短社交距离的差值,差值不大于1的用户节点为剪枝节点,在社交网络图中去除剪枝节点以及与剪枝节点关联的边集,生成剪枝后的社交网络图。The pruning module 630 is configured to calculate a difference between a group size and a shortest social distance of each user node, where the user node with a difference of not more than 1 is a pruning node, and the pruning node and the pruning are removed in the social network diagram. The edge set associated with the node generates a social network map after pruning.
在一个实施例中,剪枝模块630,还用于查找剪枝后的所述社交网络图的用户节点中是否存在节点核度小于所述群组核度的用户节点,其中,所述节点核度为所述用户节点所邻接节点的数量,若是,则在剪枝后的社交网络图中去除查找到的所述用户节点,并更新剪枝后的所述社交网络图。In an embodiment, the pruning module 630 is further configured to: find, in the user node of the social network graph after the pruning, whether there is a user node whose node is less than the group nuclearity, wherein the node core The degree is the number of nodes adjacent to the user node, and if so, the found user node is removed from the pruned social network map, and the pruned social network map is updated.
在一个实施例中,如图12所示,确定的待查找群组为多个;基于社交网络的群组查找装置还包括:In an embodiment, as shown in FIG. 12, the determined group to be searched is multiple; the social network-based group search device further includes:
群组网络图构建模块710,用于根据所述社交网络图确定所述待查找群组中各群组成员之间的边集,根据确定的所述边集以所述群组成员为用户节点构建每个所述待查询群组的群组网络图;a group network diagram construction module 710, configured to determine, according to the social network map, an edge set between each group member in the to-be-searched group, and use the group member as a user node according to the determined edge set Constructing a group network diagram of each of the groups to be queried;
亲密度计算模块720,用于计算每个群组网络图的亲密度;The intimacy calculation module 720 is configured to calculate the intimacy of each group network map;
群组反馈模块550,还用于将亲密度最大的群组网络图对应的待查找群组作为查询结果反馈至查询终端显示。The group feedback module 550 is further configured to feed back the to-be-searched group corresponding to the most intimate group network map as a query result to the query terminal display.
在一个实施例中,群组网络图的群组亲密度的计算公式为:In one embodiment, the group intimacy of the group network map is calculated as:
Co(G)=∑(u,v)∈Eω(u,v)Co(G)=∑ (u,v)∈E ω(u,v)
其中,Co(G)为群组亲密度,G=(V,E)为群组网络图,V为群组网络图中节 点的集合,E为群组网络图中的边集,Where Co(G) is the group intimacy, G=(V, E) is the group network map, and V is the section in the group network diagram. The set of points, E is the edge set in the group network diagram,
节点u,v∈V且有(u,v)∈E,
Figure PCTCN2017090571-appb-000002
Node u, v∈V and (u,v)∈E,
Figure PCTCN2017090571-appb-000002
其中N(u)表示节点u的邻居节点集合,节点u和v的共同邻居节点数为|N(u)∩N(v)|。Where N(u) represents the set of neighbor nodes of node u, and the number of common neighbor nodes of nodes u and v is |N(u)∩N(v)|.
上述网络访问行为识别装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。其中,网络接口可以是以太网卡或无线网卡等。上述各模块可以硬件形式内嵌于或独立于服务器中的处理器中,也可以以软件形式存储于服务器中的存储器中,以便于处理器调用执行以上各个模块对应的操作。该处理器可以为中央处理单元(CPU)、微处理器、单片机等。Each of the above-described network access behavior recognition devices may be implemented in whole or in part by software, hardware, and combinations thereof. The network interface may be an Ethernet card or a wireless network card. The above modules may be embedded in the hardware in the processor or in the memory in the server, or may be stored in the memory in the server, so that the processor calls the corresponding operations of the above modules. The processor can be a central processing unit (CPU), a microprocessor, a microcontroller, or the like.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,程序可存储于一计算机可读取存储介质中,如本发明实施例中,该程序可存储于计算机系统的存储介质中,并被该计算机系统中的至少一个处理器执行,以实现包括如上述各方法的实施例的流程。其中,存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。A person skilled in the art can understand that all or part of the process of implementing the above embodiment method can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium, as in the embodiment of the present invention. The program may be stored in a storage medium of a computer system and executed by at least one processor in the computer system to implement a process comprising an embodiment of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments may be arbitrarily combined. For the sake of brevity of description, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, It is considered to be the range described in this specification.
以上实施例仅表达了本发明的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干变形和改进,这些都属于本发明的保护范围。因此,本发明专利的保护范围应以所附权利要求为准。 The above embodiments are merely illustrative of several embodiments of the present invention, and the description thereof is more specific and detailed, but is not to be construed as limiting the scope of the invention. It should be noted that a number of variations and modifications may be made by those skilled in the art without departing from the spirit and scope of the invention. Therefore, the scope of the invention should be determined by the appended claims.

Claims (24)

  1. 一种基于社交网络的群组查找方法,包括:A social network based group search method includes:
    接收查询终端发送的群组查找请求,所述群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量;Receiving a group search request sent by the querying terminal, where the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
    响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集;Retrieving a pre-generated social network map in response to the group lookup request, wherein the social network map is generated according to social relationship data in a social networking website, the social network map including a plurality of user nodes and Connecting a set of edges of the user node;
    根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;Performing search expansion based on the user node corresponding to the query user identifier according to the social network map, and determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group a member until the determined number of the group members is equal to the group size;
    其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点;The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User node
    将确定的所述群组成员和所述查询用户组成待查找群组;及Forming the determined group member and the querying user into a group to be searched; and
    判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。Determining whether the group grading of the group to be searched is not less than the set group grading, and if yes, feeding the group to be searched as a query result to the query terminal for display.
  2. 根据权利要求1所述的方法,其特征在于,在所述响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集之后,所述方法还包括:The method of claim 1, wherein the pre-generated social network map is retrieved in response to the group lookup request, wherein the social network map is based on social relationship data in a social networking website After the social network map includes a plurality of user nodes and a set of edges for connecting the user nodes, the method further includes:
    以所述查询用户标识对应的用户节点为根节点构建广度优先搜索树,所述广度优先搜索树从所述查询用户标识开始依次遍历所述社交网络图中所有的用户节点;Constructing a breadth-first search tree with the user node corresponding to the query user identifier as a root node, and the breadth-first search tree sequentially traverses all the user nodes in the social network map from the query user identifier;
    根据构建的所述广度优先搜索树确定每个用户节点到所述根节点的最短社交距离;Determining a shortest social distance of each user node to the root node according to the constructed breadth-first search tree;
    计算所述群组规模与每个所述用户节点的最短社交距离的差值,所述差值 不大于1的用户节点为剪枝节点,在所述社交网络图中去除所述剪枝节点以及与所述剪枝节点关联的边集,生成剪枝后的社交网络图。Calculating a difference between the group size and a shortest social distance of each of the user nodes, the difference The user node that is not greater than 1 is a pruning node, and the pruning node and the edge set associated with the pruning node are removed in the social network map to generate a pruned social network graph.
  3. 根据权利要求2所述的方法,其特征在于,在所述计算所述群组规模与每个所述用户节点的最短社交距离的差值,所述差值不大于1的用户节点为剪枝节点,在所述社交网络图中去除所述剪枝节点以及与所述剪枝节点关联的边集,生成剪枝后的社交网络图之后,所述方法还包括:The method according to claim 2, wherein in calculating the difference between the group size and the shortest social distance of each of the user nodes, the user node whose difference is not greater than 1 is pruning After the prune node and the edge group associated with the prune node are removed from the social network map to generate the prune social network map, the method further includes:
    查找剪枝后的所述社交网络图的用户节点中是否存在节点核度小于所述群组核度的用户节点,其中,所述节点核度为所述用户节点所邻接节点的数量,若是,则在剪枝后的社交网络图中去除查找到的所述用户节点,并更新剪枝后的所述社交网络图。Finding, in the user node of the social network graph after the pruning, whether there is a user node whose node nuclear degree is smaller than the group nuclear degree, wherein the node nuclearity is the number of nodes adjacent to the user node, and if so, Then, the found user node is removed in the pruned social network map, and the pruned social network map is updated.
  4. 根据权利要求1所述的方法,其特征在于,所述根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;The method according to claim 1, wherein the searching for a user base node corresponding to the query user identifier is performed according to the social network map, and each of the search expansion layers determines one of the a user node in the social network graph that has the largest number of connected user nodes as a group member until the determined number of the group members is equal to the group size;
    其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点包括:The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User nodes include:
    在所述社交网络图中定位所述查询用户标识所在的用户节点,并以定位的所述用户节点为起始点进行层级拓展,生成拓展子图的第一拓展层,其中所述第一拓展层包括的用户节点为所述查询用户邻接的用户节点;Positioning the user node where the query user identifier is located in the social network map, and performing hierarchical expansion with the located user node as a starting point, and generating a first expansion layer of the extended sub-picture, where the first expansion layer The included user node is a user node adjacent to the query user;
    从所述拓展子图的第一拓展层中确定一个群组成员,其中所述群组成员对应的用户节点为在所述社交网络图中邻接节点数量最多的用户节点;Determining a group member from the first extension layer of the extended sub-graph, wherein the user node corresponding to the group member is a user node having the largest number of adjacent nodes in the social network graph;
    以在所述第一拓展层中的群组成员对应的用户节点为当前起始点进行所述拓展子图的下一级拓展层拓展,并在相应的拓展层中确定新的群组成员,直至确定的所述群组成员的数量等于所述群组规模。Performing, by using a user node corresponding to the group member in the first expansion layer as a current starting point, performing an expansion of the next level of the extended sub-picture, and determining a new group member in the corresponding expansion layer, until The determined number of the group members is equal to the group size.
  5. 根据权利要求1所述的方法,其特征在于,确定的所述待查找群组为多个;所述方法还包括:The method according to claim 1, wherein the determined group to be searched is plural; the method further comprises:
    根据所述社交网络图确定所述待查找群组中各群组成员之间的边集,根据 确定的所述边集以所述群组成员为用户节点构建每个所述待查询群组的群组网络图;Determining, according to the social network map, an edge set between each group member in the to-be-searched group, according to Determining the edge set to construct a group network diagram of each of the to-be-queried groups by using the group member as a user node;
    计算每个所述群组网络图的亲密度;Calculating the intimacy of each of the group network maps;
    将亲密度最大的所述群组网络图对应的所述待查找群组作为查询结果反馈至查询终端显示。The to-be-searched group corresponding to the group network map with the highest intimacy is fed back to the query terminal as a query result.
  6. 根据权利要求5所述的方法,其特征在于,所述群组网络图的群组亲密度的计算公式为:The method according to claim 5, wherein the group intimacy of the group network map is calculated as:
    Co(G)=∑(u,v)∈Eω(u,v)Co(G)=∑ (u,v)∈E ω(u,v)
    其中,Co(G)为群组亲密度,G=(V,E)为群组网络图,V为群组网络图中节点的集合,E为群组网络图中的边集,Co(G) is the group intimacy, G=(V, E) is the group network graph, V is the set of nodes in the group network graph, and E is the edge set in the group network graph.
    节点u,v∈V且有(u,v)∈E,
    Figure PCTCN2017090571-appb-100001
    Node u, v∈V and (u,v)∈E,
    Figure PCTCN2017090571-appb-100001
    其中N(u)表示节点u的邻居节点集合,节点u和v的共同邻居节点数为|N(u)∩N(v)|。Where N(u) represents the set of neighbor nodes of node u, and the number of common neighbor nodes of nodes u and v is |N(u)∩N(v)|.
  7. 一种基于社交网络的群组查找装置,包括:A group search device based on a social network, comprising:
    查找请求模块,用于接收查询终端发送的群组查找请求,所述群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量;a search request module, configured to receive a group search request sent by the query terminal, where the group search request carries a specified query user identifier, a set group size, and a group check degree, where the group core Degree defines the minimum number of members of a group that are adjacent to other members;
    社交网络图调取模块,用于响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集;a social network map retrieval module, configured to retrieve a pre-generated social network map in response to the group search request, wherein the social network map is generated according to social relationship data in a social networking website, the social network The figure includes a plurality of user nodes and a set of edges for connecting the user nodes;
    层级查找模块,用于根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行设定层数的搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,以使确定的所述群组成员的数量满足所述设定的群组规模;a hierarchical search module, configured to perform a search expansion of a set number of layers based on the user node corresponding to the query user identifier according to the social network map, and determine one in each search expansion layer in the social network map. Connecting a user node with the largest number of user nodes as a group member, so that the determined number of the group members meets the set group size;
    其中,在拓展过程中的一级拓展层包括的所述用户节点为所述查询用户的 邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点;Wherein, the user node included in the first level expansion layer in the expansion process is the query user Adjacent node, the user node included in the next-level extension layer is a user node adjacent to the group member determined by the upper-level extension layer;
    群组确定模块,用于将确定的所述群组成员和所述查询用户组成待查找群组;及a group determining module, configured to form the determined group member and the query user into a group to be searched; and
    群组反馈模块,用于判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。The group feedback module is configured to determine whether the group nuclearity of the to-be-searched group is not less than the set group nuclearity, and if yes, feed the to-be-searched group as a query result to the query terminal display.
  8. 根据权利要求7所述的装置,其特征在于,还包括:The device according to claim 7, further comprising:
    搜索树构建模块,用于以所述查询用户标识对应的用户节点为根节点构建广度优先搜索树,所述广度优先搜索树从所述查询用户标识开始依次遍历所述社交网络图中所有的用户节点;a search tree building module, configured to build a breadth-first search tree by using a user node corresponding to the query user identifier as a root node, where the breadth-first search tree sequentially traverses all users in the social network map from the query user identifier node;
    最短社交距离计算模块,用于根据构建的所述广度优先搜索树确定每个用户节点到所述根节点的最短社交距离;a shortest social distance calculation module, configured to determine a shortest social distance of each user node to the root node according to the constructed breadth-first search tree;
    剪枝模块,用于计算所述群组规模与每个所述用户节点的最短社交距离的差值,所述差值不大于1的用户节点为剪枝节点,在所述社交网络图中去除所述剪枝节点以及与所述剪枝节点关联的边集,生成剪枝后的社交网络图。a pruning module, configured to calculate a difference between the group size and a shortest social distance of each of the user nodes, where the user node whose difference is not greater than 1 is a pruning node, and is removed in the social network diagram The pruning node and the edge set associated with the pruning node generate a pruned social network map.
  9. 根据权利要求8所述的装置,其特征在于,所述剪枝模块,还用于查找剪枝后的所述社交网络图的用户节点中是否存在节点核度小于所述群组核度的用户节点,其中,所述节点核度为所述用户节点所邻接节点的数量,若是,则在剪枝后的社交网络图中去除查找到的所述用户节点,并更新剪枝后的所述社交网络图。The device according to claim 8, wherein the pruning module is further configured to: find, in a user node of the social network graph after the pruning, whether there is a user whose node is less than the group versue a node, wherein the node is a number of nodes adjacent to the user node, and if yes, removing the found user node in the pruned social network map, and updating the pruned social Network Diagram.
  10. 根据权利要求7所示的装置,其特征在于,所述层级查找模块还用于在所述社交网络图中定位所述查询用户标识所在的用户节点,并以定位的所述用户节点为起始点进行层级拓展,生成拓展子图的第一拓展层,其中所述第一拓展层包括的用户节点为所述查询用户邻接的用户节点;从所述拓展子图的第一拓展层中确定一个群组成员,其中所述群组成员对应的用户节点为在所述社交网络图中邻接节点数量最多的用户节点;以在所述第一拓展层中的群组成员对应的用户节点为当前起始点进行所述拓展子图的下一级拓展层拓展,并在相应的拓展层中确定新的群组成员,直至确定的所述群组成员的数量等于所述群 组规模。The device according to claim 7, wherein the hierarchical search module is further configured to locate the user node where the query user identifier is located in the social network map, and start with the located user node. Performing a hierarchical extension to generate a first extension layer of the extended sub-picture, wherein the user node included in the first extension layer is a user node adjacent to the query user; and determining a group from the first extension layer of the extended sub-picture a group member, wherein the user node corresponding to the group member is a user node having the largest number of adjacent nodes in the social network graph; and the user node corresponding to the group member in the first extension layer is the current starting point Performing expansion of the next level of the expansion subgraph, and determining new group members in the corresponding extension layer until the determined number of the group members is equal to the group Group size.
  11. 根据权利要求7所述的装置,其特征在于,确定的所述待查找群组为多个;所述装置还包括:The device according to claim 7, wherein the determined group to be searched is plural; the device further comprises:
    群组网络图构建模块,用于根据所述社交网络图确定所述待查找群组中各群组成员之间的边集,根据确定的所述边集以所述群组成员为用户节点构建每个所述待查询群组的群组网络图;a group network diagram construction module, configured to determine, according to the social network map, an edge set between each group member in the to-be-searched group, and construct the group member as the user node according to the determined edge set a group network diagram of each of the groups to be queried;
    亲密度计算模块,用于计算每个所述群组网络图的亲密度;a closeness calculation module, configured to calculate an intimacy of each of the group network maps;
    所述群组反馈模块,还用于将亲密度最大的所述群组网络图对应的所述待查找群组作为查询结果反馈至查询终端显示。The group feedback module is further configured to feed back the to-be-searched group corresponding to the group network map with the highest intimacy as a query result to the query terminal display.
  12. 根据权利要求11所述的装置,其特征在于,所述群组网络图的群组亲密度的计算公式为:The apparatus according to claim 11, wherein the group intimacy of the group network map is calculated as:
    Co(G)=∑(u,v)∈Eω(u,v)Co(G)=∑ (u,v)∈E ω(u,v)
    其中,Co(G)为群组亲密度,G=(V,E)为群组网络图,V为群组网络图中节点的集合,E为群组网络图中的边集,Co(G) is the group intimacy, G=(V, E) is the group network graph, V is the set of nodes in the group network graph, and E is the edge set in the group network graph.
    节点u,v∈V且有(u,v)∈E,
    Figure PCTCN2017090571-appb-100002
    Node u, v∈V and (u,v)∈E,
    Figure PCTCN2017090571-appb-100002
    其中N(u)表示节点u的邻居节点集合,节点u和v的共同邻居节点数为|N(u)∩N(v)|。Where N(u) represents the set of neighbor nodes of node u, and the number of common neighbor nodes of nodes u and v is |N(u)∩N(v)|.
  13. 一种服务器,包括存储器和处理器,所述存储器中存储有计算机可执行指令,所述指令被所述处理器执行时,使得所述处理器执行以下步骤:A server comprising a memory and a processor, the memory storing computer executable instructions, the instructions being executed by the processor, causing the processor to perform the following steps:
    接收查询终端发送的群组查找请求,所述群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量;Receiving a group search request sent by the querying terminal, where the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
    响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集;Retrieving a pre-generated social network map in response to the group lookup request, wherein the social network map is generated according to social relationship data in a social networking website, the social network map including a plurality of user nodes and Connecting a set of edges of the user node;
    根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜 索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;Searching according to the social network map with the user node corresponding to the query user identifier as a starting point Extending, in each search expansion layer, determining a user node that has the largest number of connected user nodes in the social network map as a group member until the determined number of the group members is equal to the group size;
    其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点;The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User node
    将确定的所述群组成员和所述查询用户组成待查找群组;及Forming the determined group member and the querying user into a group to be searched; and
    判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。Determining whether the group grading of the group to be searched is not less than the set group grading, and if yes, feeding the group to be searched as a query result to the query terminal for display.
  14. 根据权利要求13所述的服务器,其特征在于,在执行所述响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集之后,所述处理器还执行以下步骤:The server according to claim 13, wherein the pre-generated social network map is retrieved in response to the group search request, wherein the social network map is based on a social relationship in a social networking website After the data is generated, the social network map includes a plurality of user nodes and a set of edges for connecting the user nodes, and the processor further performs the following steps:
    以所述查询用户标识对应的用户节点为根节点构建广度优先搜索树,所述广度优先搜索树从所述查询用户标识开始依次遍历所述社交网络图中所有的用户节点;Constructing a breadth-first search tree with the user node corresponding to the query user identifier as a root node, and the breadth-first search tree sequentially traverses all the user nodes in the social network map from the query user identifier;
    根据构建的所述广度优先搜索树确定每个用户节点到所述根节点的最短社交距离;Determining a shortest social distance of each user node to the root node according to the constructed breadth-first search tree;
    计算所述群组规模与每个所述用户节点的最短社交距离的差值,所述差值不大于1的用户节点为剪枝节点,在所述社交网络图中去除所述剪枝节点以及与所述剪枝节点关联的边集,生成剪枝后的社交网络图。Calculating a difference between the group size and a shortest social distance of each of the user nodes, where the user node whose difference is not greater than 1 is a pruning node, and the pruning node is removed in the social network map and A set of edges associated with the pruning node generates a social network map after pruning.
  15. 根据权利要求14所述的服务器,其特征在于,在执行所述计算所述群组规模与每个所述用户节点的最短社交距离的差值,所述差值不大于1的用户节点为剪枝节点,在所述社交网络图中去除所述剪枝节点以及与所述剪枝节点关联的边集,生成剪枝后的社交网络图之后,所述处理器还执行以下步骤:The server according to claim 14, wherein the calculating a difference between the group size and a shortest social distance of each of the user nodes is performed, and the user node whose difference is not greater than 1 is a cut. a branch node, after removing the pruning node and the edge set associated with the pruning node in the social network map, and after generating the pruned social network map, the processor further performs the following steps:
    查找剪枝后的所述社交网络图的用户节点中是否存在节点核度小于所述群组核度的用户节点,其中,所述节点核度为所述用户节点所邻接节点的数量,若是,则在剪枝后的社交网络图中去除查找到的所述用户节点,并更新剪枝后 的所述社交网络图。Finding, in the user node of the social network graph after the pruning, whether there is a user node whose node nuclear degree is smaller than the group nuclear degree, wherein the node nuclearity is the number of nodes adjacent to the user node, and if so, Removing the found user node in the pruned social network map and updating the pruning The social network map.
  16. 根据权利要求13所述的服务器,其特征在于,所述处理器所执行的所述根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;The server according to claim 13, wherein the performing, by the processor, the search and expansion according to the user node corresponding to the query user identifier according to the social network map, and expanding in each search Determining, in the layer, a user node that has the largest number of connected user nodes in the social network graph as a group member until the determined number of the group members is equal to the group size;
    其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点包括:The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User nodes include:
    在所述社交网络图中定位所述查询用户标识所在的用户节点,并以定位的所述用户节点为起始点进行层级拓展,生成拓展子图的第一拓展层,其中所述第一拓展层包括的用户节点为所述查询用户邻接的用户节点;Positioning the user node where the query user identifier is located in the social network map, and performing hierarchical expansion with the located user node as a starting point, and generating a first expansion layer of the extended sub-picture, where the first expansion layer The included user node is a user node adjacent to the query user;
    从所述拓展子图的第一拓展层中确定一个群组成员,其中所述群组成员对应的用户节点为在所述社交网络图中邻接节点数量最多的用户节点;Determining a group member from the first extension layer of the extended sub-graph, wherein the user node corresponding to the group member is a user node having the largest number of adjacent nodes in the social network graph;
    以在所述第一拓展层中的群组成员对应的用户节点为当前起始点进行所述拓展子图的下一级拓展层拓展,并在相应的拓展层中确定新的群组成员,直至确定的所述群组成员的数量等于所述群组规模。Performing, by using a user node corresponding to the group member in the first expansion layer as a current starting point, performing an expansion of the next level of the extended sub-picture, and determining a new group member in the corresponding expansion layer, until The determined number of the group members is equal to the group size.
  17. 根据权利要求13所述的服务器,其特征在于,确定的所述待查找群组为多个;所述处理器还执行如下步骤:The server according to claim 13, wherein the determined group to be searched is plural; the processor further performs the following steps:
    根据所述社交网络图确定所述待查找群组中各群组成员之间的边集,根据确定的所述边集以所述群组成员为用户节点构建每个所述待查询群组的群组网络图;Determining, according to the social network map, an edge set between each group member in the to-be-searched group, and constructing, according to the determined edge set, the group member as a user node Group network diagram;
    计算每个所述群组网络图的亲密度;Calculating the intimacy of each of the group network maps;
    将亲密度最大的所述群组网络图对应的所述待查找群组作为查询结果反馈至查询终端显示。The to-be-searched group corresponding to the group network map with the highest intimacy is fed back to the query terminal as a query result.
  18. 根据权利要求17所述的服务器,其特征在于,所述群组网络图的群组亲密度的计算公式为: The server according to claim 17, wherein the group intimacy of the group network map is calculated as:
    Co(G)=∑(u,v)∈Eω(u,v)Co(G)=∑ (u,v)∈E ω(u,v)
    其中,Co(G)为群组亲密度,G=(V,E)为群组网络图,V为群组网络图中节点的集合,E为群组网络图中的边集,Co(G) is the group intimacy, G=(V, E) is the group network graph, V is the set of nodes in the group network graph, and E is the edge set in the group network graph.
    节点u,v∈V且有(u,v)∈E,
    Figure PCTCN2017090571-appb-100003
    Node u, v∈V and (u,v)∈E,
    Figure PCTCN2017090571-appb-100003
    其中N(u)表示节点u的邻居节点集合,节点u和v的共同邻居节点数为|N(u)∩N(v)|。Where N(u) represents the set of neighbor nodes of node u, and the number of common neighbor nodes of nodes u and v is |N(u)∩N(v)|.
  19. 一个或多个存储有计算机可执行指令的非易失性可读存储介质,所述计算机可执行指令被一个或多个处理器执行,使得所述一个或多个处理器执行以下步骤:One or more non-volatile readable storage media storing computer-executable instructions, the computer-executable instructions being executed by one or more processors, such that the one or more processors perform the steps of:
    接收查询终端发送的群组查找请求,所述群组查找请求中携带指定包含的查询用户标识、设定的群组规模和群组核度,其中,所述群组核度限定了群组成员邻接其他成员的最少的数量;Receiving a group search request sent by the querying terminal, where the group search request carries a specified query user identifier, a set group size, and a group verification degree, wherein the group nuclearity defines a group member The minimum number of adjacent members;
    响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集;Retrieving a pre-generated social network map in response to the group lookup request, wherein the social network map is generated according to social relationship data in a social networking website, the social network map including a plurality of user nodes and Connecting a set of edges of the user node;
    根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;Performing search expansion based on the user node corresponding to the query user identifier according to the social network map, and determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network map as a group a member until the determined number of the group members is equal to the group size;
    其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点;The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User node
    将确定的所述群组成员和所述查询用户组成待查找群组;及Forming the determined group member and the querying user into a group to be searched; and
    判断所述待查找群组的群组核度是否不小于设定的所述群组核度,若是,将所述待查找群组作为查询结果反馈至查询终端显示。Determining whether the group grading of the group to be searched is not less than the set group grading, and if yes, feeding the group to be searched as a query result to the query terminal for display.
  20. 根据权利要求19所述的非易失性可读存储介质,其特征在于,在执行 所述响应于所述群组查找请求,调取预先生成的社交网络图,其中,所述社交网络图是根据社交网站中的社交关系数据生成的,所述社交网络图包括多个用户节点和用于连接所述用户节点的边集之后,所述处理器还执行以下步骤:A non-volatile readable storage medium according to claim 19, wherein Retrieving a pre-generated social network map in response to the group lookup request, wherein the social network map is generated according to social relationship data in a social networking website, the social network map including a plurality of user nodes and After connecting the edge set of the user node, the processor also performs the following steps:
    以所述查询用户标识对应的用户节点为根节点构建广度优先搜索树,所述广度优先搜索树从所述查询用户标识开始依次遍历所述社交网络图中所有的用户节点;Constructing a breadth-first search tree with the user node corresponding to the query user identifier as a root node, and the breadth-first search tree sequentially traverses all the user nodes in the social network map from the query user identifier;
    根据构建的所述广度优先搜索树确定每个用户节点到所述根节点的最短社交距离;Determining a shortest social distance of each user node to the root node according to the constructed breadth-first search tree;
    计算所述群组规模与每个所述用户节点的最短社交距离的差值,所述差值不大于1的用户节点为剪枝节点,在所述社交网络图中去除所述剪枝节点以及与所述剪枝节点关联的边集,生成剪枝后的社交网络图。Calculating a difference between the group size and a shortest social distance of each of the user nodes, where the user node whose difference is not greater than 1 is a pruning node, and the pruning node is removed in the social network map and A set of edges associated with the pruning node generates a social network map after pruning.
  21. 根据权利要求20所述的非易失性可读存储介质,其特征在于,在执行所述计算所述群组规模与每个所述用户节点的最短社交距离的差值,所述差值不大于1的用户节点为剪枝节点,在所述社交网络图中去除所述剪枝节点以及与所述剪枝节点关联的边集,生成剪枝后的社交网络图之后,所述处理器还执行以下步骤:The non-volatile readable storage medium according to claim 20, wherein said calculating a difference between said group size and a shortest social distance of each of said user nodes is performed, said difference is not The user node greater than 1 is a pruning node, and after removing the pruning node and the edge set associated with the pruning node in the social network map to generate a pruned social network map, the processor further Perform the following steps:
    查找剪枝后的所述社交网络图的用户节点中是否存在节点核度小于所述群组核度的用户节点,其中,所述节点核度为所述用户节点所邻接节点的数量,若是,则在剪枝后的社交网络图中去除查找到的所述用户节点,并更新剪枝后的所述社交网络图。Finding, in the user node of the social network graph after the pruning, whether there is a user node whose node nuclear degree is smaller than the group nuclear degree, wherein the node nuclearity is the number of nodes adjacent to the user node, and if so, Then, the found user node is removed in the pruned social network map, and the pruned social network map is updated.
  22. 根据权利要求19所述的非易失性可读存储介质,其特征在于,所述处理器所执行的所述根据所述社交网络图以所述查询用户标识对应的用户节点为起始点进行搜索拓展,在每个搜索拓展层中确定一个在所述社交网络图中连接用户节点数量最多的用户节点作为群组成员,直至确定的所述群组成员的数量等于所述群组规模;The non-volatile readable storage medium according to claim 19, wherein said searching performed by said processor searches for a user node corresponding to said query user identifier according to said social network map Expanding, determining, in each search expansion layer, a user node that has the largest number of connected user nodes in the social network graph as a group member until the determined number of the group members is equal to the group size;
    其中,拓展的一级拓展层包括的所述用户节点为所述查询用户的邻接节点,下一级拓展层包括的所述用户节点为上一级拓展层确定的所述群组成员所邻接的用户节点包括: The user node that is included in the extended first-level extension layer is an adjacent node of the query user, and the user node included in the next-level extension layer is adjacent to the group member determined by the upper-level extension layer. User nodes include:
    在所述社交网络图中定位所述查询用户标识所在的用户节点,并以定位的所述用户节点为起始点进行层级拓展,生成拓展子图的第一拓展层,其中所述第一拓展层包括的用户节点为所述查询用户邻接的用户节点;Positioning the user node where the query user identifier is located in the social network map, and performing hierarchical expansion with the located user node as a starting point, and generating a first expansion layer of the extended sub-picture, where the first expansion layer The included user node is a user node adjacent to the query user;
    从所述拓展子图的第一拓展层中确定一个群组成员,其中所述群组成员对应的用户节点为在所述社交网络图中邻接节点数量最多的用户节点;Determining a group member from the first extension layer of the extended sub-graph, wherein the user node corresponding to the group member is a user node having the largest number of adjacent nodes in the social network graph;
    以在所述第一拓展层中的群组成员对应的用户节点为当前起始点进行所述拓展子图的下一级拓展层拓展,并在相应的拓展层中确定新的群组成员,直至确定的所述群组成员的数量等于所述群组规模。Performing, by using a user node corresponding to the group member in the first expansion layer as a current starting point, performing an expansion of the next level of the extended sub-picture, and determining a new group member in the corresponding expansion layer, until The determined number of the group members is equal to the group size.
  23. 根据权利要求19所述的非易失性可读存储介质,其特征在于,确定的所述待查找群组为多个;所述处理器还执行如下步骤:The non-volatile readable storage medium according to claim 19, wherein the determined group to be searched is plural; the processor further performs the following steps:
    根据所述社交网络图确定所述待查找群组中各群组成员之间的边集,根据确定的所述边集以所述群组成员为用户节点构建每个所述待查询群组的群组网络图;Determining, according to the social network map, an edge set between each group member in the to-be-searched group, and constructing, according to the determined edge set, the group member as a user node Group network diagram;
    计算每个所述群组网络图的亲密度;Calculating the intimacy of each of the group network maps;
    将亲密度最大的所述群组网络图对应的所述待查找群组作为查询结果反馈至查询终端显示。The to-be-searched group corresponding to the group network map with the highest intimacy is fed back to the query terminal as a query result.
  24. 根据权利要求23所述的非易失性可读存储介质,其特征在于,所述群组网络图的群组亲密度的计算公式为:The non-volatile readable storage medium according to claim 23, wherein the group intimacy of the group network map is calculated as:
    Co(G)=∑(u,v)∈Eω(u,v)Co(G)=∑ (u,v)∈E ω(u,v)
    其中,Co(G)为群组亲密度,G=(V,E)为群组网络图,V为群组网络图中节点的集合,E为群组网络图中的边集,Co(G) is the group intimacy, G=(V, E) is the group network graph, V is the set of nodes in the group network graph, and E is the edge set in the group network graph.
    节点u,v∈V且有(u,v)∈E,
    Figure PCTCN2017090571-appb-100004
    Node u, v∈V and (u,v)∈E,
    Figure PCTCN2017090571-appb-100004
    其中N(u)表示节点u的邻居节点集合,节点u和v的共同邻居节点数为|N(u)∩N(v)|。 Where N(u) represents the set of neighbor nodes of node u, and the number of common neighbor nodes of nodes u and v is |N(u)∩N(v)|.
PCT/CN2017/090571 2016-04-07 2017-06-28 Group search method based on social network, device, server and storage medium WO2018184305A1 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
SG11201709902TA SG11201709902TA (en) 2017-04-07 2017-06-28 Method, device, server and storage medium of searchinhg a group based on social network
US15/578,407 US10268655B2 (en) 2016-04-07 2017-06-28 Method, device, server and storage medium of searching a group based on social network
AU2017268599A AU2017268599B2 (en) 2017-04-07 2017-06-28 Method, device, server and storage medium of searching a group based on social network
EP17801323.1A EP3608798A4 (en) 2017-04-07 2017-06-28 Group search method based on social network, device, server and storage medium
JP2017568053A JP6608972B2 (en) 2017-04-07 2017-06-28 Method, device, server, and storage medium for searching for group based on social network

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710224884.2 2016-04-07
CN201710224884.2A CN107092667B (en) 2017-04-07 2017-04-07 Group's lookup method and device based on social networks

Publications (1)

Publication Number Publication Date
WO2018184305A1 true WO2018184305A1 (en) 2018-10-11

Family

ID=59646366

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/090571 WO2018184305A1 (en) 2016-04-07 2017-06-28 Group search method based on social network, device, server and storage medium

Country Status (8)

Country Link
US (1) US10268655B2 (en)
EP (1) EP3608798A4 (en)
JP (1) JP6608972B2 (en)
CN (1) CN107092667B (en)
AU (1) AU2017268599B2 (en)
SG (1) SG11201709902TA (en)
TW (1) TWI652586B (en)
WO (1) WO2018184305A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109271478B (en) * 2018-09-17 2021-07-27 华中科技大学 Knowledge graph data layout method in social network based on BFS forest
US11074368B2 (en) * 2018-10-15 2021-07-27 International Business Machines Corporation Obfuscation and routing of sensitive actions or requests based on social connections
CN111177578B (en) * 2019-12-16 2022-04-15 杭州电子科技大学 Search method for most influential community around user
CN112087371B (en) * 2020-09-10 2022-11-18 北京百度网讯科技有限公司 Instant messaging group searching method, device, equipment and storage medium
CN113190720B (en) * 2021-05-17 2023-01-17 深圳计算科学研究院 Graph compression-based graph database construction method and device and related components
CN116150507B (en) * 2023-04-04 2023-06-30 湖南蚁坊软件股份有限公司 Water army group identification method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8135800B1 (en) * 2006-12-27 2012-03-13 Qurio Holdings, Inc. System and method for user classification based on social network aware content analysis
CN103595734A (en) * 2013-12-02 2014-02-19 中国科学院信息工程研究所 On-line social network rapid repairing method based on user associative structure partition
CN105893382A (en) * 2014-12-23 2016-08-24 天津科技大学 Priori knowledge based microblog user group division method

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7860889B1 (en) * 2004-05-12 2010-12-28 Cisco Technology, Inc. Methods and apparatus for redetermining social maps upon expectation of change
WO2009107416A1 (en) * 2008-02-27 2009-09-03 日本電気株式会社 Graph structure variation detection apparatus, graph structure variation detection method, and program
US8239364B2 (en) * 2009-12-08 2012-08-07 Facebook, Inc. Search and retrieval of objects in a social networking system
US9350824B2 (en) 2011-10-08 2016-05-24 Broadcom Corporation Social device service and support via automatic group association
US8938512B2 (en) 2012-09-06 2015-01-20 Facebook, Inc. Recommending groups to create in a social networking system
US9053420B2 (en) 2012-09-25 2015-06-09 Reunify Llc Methods and systems for scalable group detection from multiple data streams
US9547877B2 (en) 2013-10-03 2017-01-17 Linkedin Corporation Identification of a trigger-type leader in a social network
CN103838831B (en) * 2014-02-21 2017-02-22 东南大学 On-line social network mass data storage method based on community division
CN103823888B (en) 2014-03-07 2017-02-08 安徽融数信息科技有限责任公司 Node-closeness-based social network site friend recommendation method
CN105022761B (en) * 2014-04-30 2020-11-03 腾讯科技(深圳)有限公司 Group searching method and device
CN104700311B (en) * 2015-01-30 2018-02-06 福州大学 A kind of neighborhood in community network follows community discovery method
CN104731962B (en) 2015-04-03 2018-10-12 重庆邮电大学 Friend recommendation method and system based on similar corporations in a kind of social networks

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8135800B1 (en) * 2006-12-27 2012-03-13 Qurio Holdings, Inc. System and method for user classification based on social network aware content analysis
CN103595734A (en) * 2013-12-02 2014-02-19 中国科学院信息工程研究所 On-line social network rapid repairing method based on user associative structure partition
CN105893382A (en) * 2014-12-23 2016-08-24 天津科技大学 Priori knowledge based microblog user group division method

Also Published As

Publication number Publication date
AU2017268599B2 (en) 2019-11-21
US10268655B2 (en) 2019-04-23
TW201837749A (en) 2018-10-16
CN107092667B (en) 2018-02-27
CN107092667A (en) 2017-08-25
TWI652586B (en) 2019-03-01
AU2017268599A1 (en) 2018-10-25
SG11201709902TA (en) 2018-11-29
EP3608798A4 (en) 2020-11-11
JP6608972B2 (en) 2019-11-20
JP2019513245A (en) 2019-05-23
US20180300413A1 (en) 2018-10-18
EP3608798A1 (en) 2020-02-12

Similar Documents

Publication Publication Date Title
WO2018184305A1 (en) Group search method based on social network, device, server and storage medium
US10289643B2 (en) Automatic discovery of popular landmarks
WO2019200714A1 (en) Server connection method, computer readable storage medium, terminal device, and apparatus
US20160232179A1 (en) Recommending points of interests in a region
WO2018010491A1 (en) Method and device for generating service path
CN110059264B (en) Site retrieval method, equipment and computer storage medium based on knowledge graph
WO2019205373A1 (en) Similar user search apparatus and method, and computer readable storage medium
US10191998B1 (en) Methods of data reduction for parallel breadth-first search over graphs of connected data elements
WO2016070751A1 (en) Distributed cache range querying method, device, and system
US9754015B2 (en) Feature rich view of an entity subgraph
WO2013138441A1 (en) Systems, methods, and software for computing reachability in large graphs
WO2022247868A1 (en) Multi-sub-graph matching method, apparatus and device
WO2018227773A1 (en) Place recommendation method and apparatus, computer device, and storage medium
WO2019072038A1 (en) Information generation method and device
CN111159577A (en) Community division method and device, storage medium and electronic device
CN113282799B (en) Node operation method, node operation device, computer equipment and storage medium
CN111858613B (en) Service data retrieval method
WO2013097065A1 (en) Index data processing method and device
JP2017530477A (en) System and method for processing graphs
CN114897666A (en) Graph data storage, access, processing method, training method, device and medium
CN110555158A (en) mutually exclusive data processing method and system, and computer readable storage medium
CN110909097B (en) Polygonal electronic fence generation method and device, computer equipment and storage medium
CN114048219A (en) Graph database updating method and device
WO2021036190A1 (en) Node layout determination method and apparatus
CN110297818B (en) Method and device for constructing data warehouse

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 15578407

Country of ref document: US

ENP Entry into the national phase

Ref document number: 2017568053

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 2017268599

Country of ref document: AU

Date of ref document: 20170628

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17801323

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE