Method and device for generating interpersonal relationship information
By determining and combining the friend node sets of user nodes in the social network, the efficiency of interpersonal information generation is improved and the problem of low information generation efficiency in large-scale social networks is solved.
Patent Information
- Application Number
- CN201910561863.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-26
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2039-06-26
AI Technical Summary
In large-scale social networks, the generation of interpersonal information is inefficient, causing computers to spend a lot of time processing massive interpersonal data.
By obtaining the social network relationship information, the friend nodes of each user node are determined, and based on these friend nodes, the first friend node set and the second friend node set are generated, and the nodes are combined to obtain personal interpersonal relationship information, and finally generate the overall user interpersonal relationship information.
The efficiency of generating interpersonal relationship information is improved. By directly combining the first friend node and the second friend node of the user node, personal interpersonal information is directly obtained, which reduces the amount of calculation and processing time.
Smart Images

Figure CN110335164B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method and device for generating interpersonal relationship information. Background Art
[0002] A social network is a social structure consisting of a collection of social individuals and the connections between individuals on an information network. With the development of social networks, computers can classify the interpersonal relationships between users and provide social services to users based on these interpersonal relationships. For example, computers can calculate the friends of the friends of the target user and recommend the friends of these friends to the target user.
[0003] In large-scale social networks, as the number of users and friends increases, computers often need to consume a lot of time to calculate these massive interpersonal relationships. Therefore, the current methods for generating interpersonal relationship information are inefficient. Summary of the invention
[0004] The embodiments of the present application provide a method and device for generating interpersonal relationship information, which can improve the efficiency of the method for generating interpersonal relationship information.
[0005] The present application provides a method for generating interpersonal relationship information, including:
[0006] Acquire social network relationship information of a target application, wherein the social network relationship information includes a plurality of user nodes;
[0007] Determine at least one friend node of each user node according to the social network relationship information;
[0008] Generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes;
[0009] Perform node combination according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node;
[0010] The overall user interpersonal relationship information of the target application is generated based on the personal interpersonal relationship information of each user node.
[0011] The present application also provides a device for generating interpersonal relationship information, including:
[0012] An acquisition unit, configured to acquire social network relationship information of a target application, wherein the social network relationship information includes a plurality of user nodes;
[0013] A node unit, configured to determine at least one friend node of each user node according to the social network relationship information;
[0014] A collection unit, configured to generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes;
[0015] An information unit, used to combine nodes according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node;
[0016] The overall information unit is used to generate overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node.
[0017] The embodiments of the present application can obtain social network relationship information of a target application, where the social network relationship information includes multiple user nodes; determine at least one friend node of each user node based on the social network relationship information; generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes; generate personal interpersonal relationship information of each user node based on the first friend node set and the second friend node set; and generate overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node.
[0018] In the present application, the personal interpersonal relationship information of the user node can be directly obtained by combining the first friend node and the second friend node of the user node. Therefore, the solution can improve the efficiency of the interpersonal relationship information generation method. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0020] Figure 1a is a schematic diagram of a scenario of a method for generating interpersonal relationship information provided in an embodiment of the present application;
[0021] Figure 1b is a flowchart of a method for generating interpersonal relationship information provided in an embodiment of the present application;
[0022] Figure 1c is a structural diagram of a social network relationship provided in an embodiment of the present application;
[0023] Figure 1d This is a schematic diagram of the structure of a user node friend node provided in an embodiment of the present application;
[0024] Figure 1eThis is a schematic diagram of the relationship between the user node Y friend node and its first friend node set and the second friend node set provided in an embodiment of the present application;
[0025] Figure 1f is a schematic diagram of personal interpersonal relationships of user A provided in an embodiment of the present application;
[0026] Figure 1g It is a schematic diagram of the process of information integration provided by the embodiment of the present application;
[0027] Figure 2 It is a schematic diagram of the process of large node processing provided by an embodiment of the present application;
[0028] Figure 3a This is a schematic diagram of the first structure of the device for generating interpersonal relationship information provided in an embodiment of the present application;
[0029] Figure 3b This is a second structural diagram of the device for generating interpersonal relationship information provided in an embodiment of the present application;
[0030] Figure 4 It is a schematic diagram of the structure of the server provided in the embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0032] The embodiments of the present application provide a method and device for generating interpersonal relationship information.
[0033] Specifically, the interpersonal relationship information generation device can be integrated in an electronic device, and the electronic device can be a terminal, a server, or other devices. The terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer (PC) and other devices; the server can be a single server or a server cluster composed of multiple servers. In some embodiments, the interpersonal relationship information generation device can also be integrated in multiple electronic devices, for example, the interpersonal relationship information generation device can be integrated in multiple servers, and the interpersonal relationship information generation method of the present application can be implemented by multiple servers.
[0034] refer to Figure 1aThe scenario diagram of the interpersonal relationship information generation method shown in the figure may include an interpersonal relationship information server, a target application server and a database server, and the interpersonal relationship information device may be integrated in the interpersonal relationship information server.
[0035] Among them, the interpersonal relationship information server can obtain social network relationship information from the target application server, and determine at least one friend node of each user node based on the social network relationship information; then generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes; then perform node combination based on the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node; finally, generate overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node, and send the overall user interpersonal relationship information to the database server of the target application.
[0036] It should be noted that the serial numbers of the following embodiments are not intended to limit the preferred order of the embodiments.
[0037] In this embodiment, a method for generating interpersonal relationship information is provided. Figure 1b As shown, the specific process of the interpersonal relationship information generation method can be as follows:
[0038] 101. Obtain social network relationship information of a target application, where the social network relationship information includes multiple user nodes.
[0039] There are many ways to obtain the social network relationship information of the target application, such as obtaining it from the target application server through the network, obtaining it by reading the social network relationship information of the target application stored in the local memory, obtaining it by reading the social network relationship information of the target application input by the technician, etc.
[0040] The social network relationship information of the target application refers to data information including interpersonal relationships between users in the target application. The social network relationship information can be expressed in various forms, for example, the social network relationship information can be saved in the form of graphs, tables, links, strings, etc.
[0041] For example, refer to Figure 1c The social network relationship structure diagram shown in the figure includes multiple user nodes and multiple edges connecting the user nodes. Each user node can represent a user in the target application, and the edges connecting the user nodes can represent the interpersonal relationships between users.
[0042] Each user node may carry node information, wherein the node information may include user attributes of the user represented by the user node, such as user gender, user age, number of user fans, and the like.
[0043] Each edge may carry relationship information, wherein the relationship information may include user relationship attributes between users represented by user nodes at both ends of the edge, such as subscription relationship, friend relationship, blacklist relationship, focus relationship, etc.
[0044] 102. Determine at least one friend node of each user node according to the social network relationship information.
[0045] For example, refer to Figure 1d , the friend nodes a1 and a2 of user node A and the friend nodes b1, b2 and b3 of user node B can be determined according to the social network relationship information.
[0046] The specific determination method may be to traverse the user nodes in the social network relationship information, and obtain the edges connected to the user nodes and the adjacent user nodes connected to the edges.
[0047] For example, in some embodiments, the following steps may be executed in a loop to traverse the user nodes in the social network relationship information:
[0048] a. Determine the current user node based on the previous user node;
[0049] b. Determine the edge connected to the current user node;
[0050] c. When the user relationship attribute of the edge is a friend relationship, obtain the edge and the friend node at the other end of the edge.
[0051] 103. Generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes.
[0052] The first friend node set includes a plurality of first friend nodes, the second friend node set includes a plurality of second friend nodes, and the friend nodes of each user node may include a first friend node and a second friend node.
[0053] For example, refer to Figure 1e The diagram shows the relationship between the friend nodes of user node Y and its first friend node set and second friend node set, wherein user nodes 1, 2, 3, 4, and 5 are all friend nodes of user node Y. Based on the friend nodes of user node Y, the first friend node set and the second friend node set of user node Y can be generated, wherein the first friend node set includes user nodes 1 and 2, and the second friend node set includes user nodes 3, 4, and 5.
[0054] Specifically, in some embodiments, step 103 may include the following steps:
[0055] (1) When the node filtering condition is not obtained, the friend node corresponding to the user node is used as the first friend node of the user node, and the friend node corresponding to the user node is used as the second friend node of the user node;
[0056] (2) When the node filtering condition is obtained, a first friend node set and a second friend node set corresponding to each user node are generated according to the filtering condition.
[0057] Among them, the node filtering conditions can be pre-set by the technician, or obtained from the server through the network, or obtained by reading the local memory, etc.
[0058] For example, in order to make the final overall user interpersonal relationship information the overall user interpersonal relationship information of a specific user, for example, to obtain the overall user interpersonal relationship information of a higher level in the target application, to obtain the overall user interpersonal relationship information of females in the target application, to obtain the overall user interpersonal relationship information of users with more than 1,000 fans in the target application, node filtering conditions can be used to filter user nodes.
[0059] In order to reduce the amount of calculation of the interpersonal relationship information generation method, thereby improving the efficiency of the interpersonal relationship information generation method, in some embodiments, a node filtering condition can be set. For example, if the node filtering condition is set to be female, the user gender in the node information of the user node can be compared with the node filtering condition, and the user nodes that do not meet the node filtering condition can be filtered to obtain the first friend node set. The filtering method of the second friend node set is similar to the filtering method of the first friend node set. The specific steps are as follows:
[0060] a. Get node filtering conditions, which include first node filtering conditions and second node filtering conditions;
[0061] b. Filtering the first friend node in the first friend node set based on the first node filtering condition to obtain the filtered first friend node set;
[0062] c. Perform node filtering on the second friend nodes in the second friend node set based on the second node filtering condition to obtain a filtered second friend node set.
[0063] It should be noted that the first node filtering condition may be the same as or different from the second node filtering condition, and the method for obtaining the first node filtering condition may be the same as or different from the method for obtaining the second node filtering condition, which is not required here.
[0064] 104. Perform node combination according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node.
[0065] Among them, personal interpersonal relationship information refers to information used to represent the interpersonal relationship of user nodes. There are many ways to represent the personal interpersonal relationship information, for example, personal interpersonal relationship information stored in the form of graphs, tables, links, strings, etc.
[0066] In some embodiments, the personal interpersonal relationship information of the user node may include personal interpersonal relationship information with the user node as a common friend. A common friend refers to a friend of two other users at the same time. For example, user x is a friend of user y, and user y is a friend of user z, that is, user y is a common friend of user x and user z.
[0067] For example, refer to Figure 1f As shown in the personal interpersonal relationship diagram of user A, the personal interpersonal relationship information includes the common friend relationships between user A and users B, C, D, and E, wherein user A is a common friend of user B and user C; at the same time, user A is a common friend of user D and user E; at the same time, user A is a common friend of user B and user E.
[0068] In some embodiments, step 104 may include the following specific steps:
[0069] (1) Determine the current user node in the social network relationship information;
[0070] (2) Determine a first friend node set and a second friend node set of the current user node;
[0071] (3) Determine the current first friend node in the first friend node set and the current second friend node in the second friend node set.
[0072] In some embodiments, step (3) may further include: determining a current first friend node in the first friend node subset and a current second friend node in the second friend node subset.
[0073] (4) Determine the current first friend node in the first friend node set and the current second friend node in the second friend node set.
[0074] In some embodiments, in order to prevent the computer memory from being unable to store too much node data in the set, and to reduce the time consumption of calculating the node combination of a single first friend node set and a single second friend node set, step (4) may also include the following specific steps:
[0075] a. Get the set size of the first friend node set and the set size of the second friend node set;
[0076] b. when the set size of the first friend node set is greater than a preset threshold, splitting the first friend node set to obtain a plurality of first friend node subsets of the first friend node set;
[0077] c. When the set size of the second friend node set is greater than a preset threshold, the second friend node set is split into sets to obtain a plurality of second friend node subsets of the second friend node set.
[0078] The first friend node subset may include the current first friend node, and the second friend node subset may include the current second friend node.
[0079] (5) Generate interpersonal relationship sub-information of the current user node according to the current first friend node, the current second friend node and the current user node.
[0080] For example, in some embodiments, the interpersonal relationship filtering condition may be used to filter the interpersonal relationship information of each user node, thereby achieving a global filtering effect. Therefore, step (5) may include the following steps:
[0081] a. Get interpersonal relationship filtering conditions;
[0082] b. When the interpersonal relationship sub-information of the current user node meets the interpersonal relationship filtering condition, the interpersonal relationship sub-information of the current user node is generated according to the current first friend node, the current second friend node and the current user node.
[0083] In some embodiments, the first friend node set is a filtered first friend node set, and the second friend node set is a filtered second friend node set, so step 104 includes:
[0084] Based on the filtered first friend node set and the filtered second friend node set of each user node, the interpersonal relationship information of each user node is generated.
[0085] 105. Generate overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node.
[0086] In some embodiments, in order to reduce the redundancy in the overall user interpersonal relationship information, step 105 may include the following steps:
[0087] (1) Sort the personal interpersonal relationship information of each user node to obtain sorted personal interpersonal relationship information.
[0088] The personal interpersonal relationship information of each user node may be sorted according to the user attributes of the user node, for example, the personal interpersonal relationship information of each user node may be sorted according to the user attributes such as the user node number, identifier, user age, etc.
[0089] (2) Generate overall user interpersonal relationship information of the target application based on the sorted personal interpersonal relationship information.
[0090] The overall user interpersonal relationship information may be a portion of the sorted individual interpersonal relationship information, for example, the first 50% of the individual interpersonal relationship information may be taken as the overall user interpersonal relationship information.
[0091] In some embodiments, the step of generating overall user interpersonal relationship information of the target application based on the sorted personal interpersonal relationship information may specifically include:
[0092] a. Determine the current first node and the current second node in the social network relationship information;
[0093] b. determining multiple target interpersonal relationship information corresponding to the current first node and the current second node in the sorted personal interpersonal relationship information;
[0094] c. Integrate multiple target interpersonal relationship information to obtain the overall user interpersonal relationship information of the target application.
[0095] For example, reference Figure 1g As shown in the schematic diagram of the information integration process, it can be seen that when user node B and user node C have common friend A and common friend D, the target interpersonal relationship information 1 and the target interpersonal relationship information 2 are integrated to obtain the overall user interpersonal relationship information of the target application.
[0096] As can be seen from the above, the method provided by the embodiment of the present invention can obtain the social network relationship information of the target application, and the social network relationship information includes multiple user nodes; determine at least one friend node of each user node according to the social network relationship information; generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes; perform node combination according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node; and generate the overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node.
[0097] In the embodiment of the present application, by combining the first friend node and the second friend node of the user node, the personal interpersonal relationship information of the user node can be directly obtained. Therefore, the solution can improve the efficiency of the interpersonal relationship information generation method.
[0098] The method described in the above embodiment will be further described in detail below.
[0099] In the field of gaming, there are a large number of users and a large number of friends. In addition, in gaming social interaction, it is often necessary to provide users with information about their common friends. Therefore, in this embodiment, the method of generating interpersonal relationship information will be described in detail by taking the application of the method in the field of gaming as an example.
[0100] (1) Obtaining social network relationship information of the target game application, and determining at least one friend node of each user node based on the social network relationship information.
[0101] For obtaining the social network relationship information of the target game application, reference may be made to step 101, which will not be described in detail here.
[0102] The social network relationship information may be a social network relationship graph, which is referred to herein as G(V, E), wherein V is a set of user nodes in the social network relationship graph, and E is a set of edges in the social network relationship graph.
[0103] For example, the node set V can be expressed as [v, u, x, y], that is, the node set V can include node v, node u, node c, and node y.
[0104] For example, the edge set E can be expressed as [<v,u> ,<x,y> ,<v,y> ], that is, the edge set E can include the edge between node v and node u, the edge between node x and node y, and the edge between node v and node y.
[0105] When determining at least one friend node of each user node according to the social network relationship information, the set E of edges in the social network relationship graph may be traversed with reference to step 102. For example, the set E includes edges<v,u> , then node v is taken as a friend node of node u and added to the friend node set S(u), and node u is taken as a friend node of node v and added to the friend node set S(v).
[0106] (ii) generating a first friend node set and a second friend node set corresponding to each user node based on the friend nodes.
[0107] For the friend node set of each node, a first friend node set and a second friend node set corresponding to each user node are generated.
[0108] For example, for node u, a first friend node set L(u) and a second friend node set R(u) of node u are generated according to the friend node set S(u) of node u.
[0109] In this embodiment, a node filtering condition may be used to reduce the amount of calculation for node filtering, thereby improving the efficiency of the method for generating interpersonal relationship information.
[0110] For example, when the node filtering condition is not obtained, the friend node set S(u) is used as the first friend node set L(u), and the friend node set S(u) is used as the second friend node set R(u).
[0111] When the first node filtering condition is obtained, the nodes in the first friend node set L(u) can be filtered according to the first node filtering condition; when the second node filtering condition is obtained, the nodes in the second friend node set R(u) can be filtered according to the second node filtering condition.
[0112] (iii) Node combination is performed based on the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node.
[0113] For example, based on the first friend node set L(u) and the second friend node set R(u) of user node u, node combination is performed to obtain the personal interpersonal relationship information of user node u; based on the first friend node set L(v) and the second friend node set R(v) of user node v, node combination is performed to obtain the personal interpersonal relationship information of user node v, and so on.
[0114] By combining the first friend node set L(u) and the second friend node set R(u) of the user node u, we can obtain the personal interpersonal relationship information of the user node u [<(l1, r1), u>, <(l1, r2), u>, <(l1, r3), u>, ... <(l2, r1), u>, ... <(l3, r1), u>, ...], where l1, l2, l3... are nodes in the first friend node set L(u), r1, r2, r3... are nodes in the first friend node set R(u), and u is a common friend node of the nodes in L(u) and the nodes in R(u).
[0115] In some embodiments, interpersonal relationship filtering conditions may also be used to filter the obtained personal interpersonal relationship information of each user node, thereby achieving a global filtering effect.
[0116] Specific interpersonal relationship filtering conditions can be set by technical personnel.
[0117] In addition, in social networks, there are often some user nodes with a large number of friends, which are referred to as large nodes below. For example, the number of fans and friends of Internet celebrities can reach millions. When processing large nodes, due to the limited computer memory and the long processing time, in this embodiment, large node processing can be performed in a distributed manner. The specific process can be referred to in Figure 2 ,as follows:
[0118] (1) Obtain the set size of the first friend node set and the set size of the second friend node set.
[0119] Get the set size L of the first friend node set L(u) and the set size R of the second friend node set R(u).
[0120] There are many methods for obtaining the set size of the first friend node set and the set size of the second friend node set. For example, the set size of the first friend node set and the set size of the second friend node set are obtained by calculation.
[0121] (2) When the set size of the first friend node set is greater than a preset threshold, the first friend node set is split into sets to obtain a plurality of first friend node subsets of the first friend node set.
[0122] When the size L of the first friend node set L(u) does not exceed the preset threshold M, L1(u) is set to L(u).
[0123] Otherwise, when the size L of the first friend node set L(u) exceeds the preset threshold M, the first friend node set L(u) is split into k first friend node subsets of equal size L1(u), L2(u), ..., L k (u).
[0124] Wherein, k = L / M. That is, there is no intersection between these first friend node subsets, and their union is equal to L(u).
[0125] (3) When the set size of the second friend node set is greater than a preset threshold, the second friend node set is split into sets to obtain a plurality of second friend node subsets of the second friend node set.
[0126] When the size R of the second friend node set R(u) does not exceed the preset threshold M, R1(u) is set to R(u).
[0127] Otherwise, when the size R of the second friend node set R(u) exceeds the preset threshold M, the second friend node set R(u) is split into t second friend node subsets of equal size R1(u), R2(u), ..., R t (u).
[0128] Wherein, t = R / M. That is, there is no intersection between these first friend node subsets, and their union is equal to L(u).
[0129] (4) Perform node combination based on the current first friend node in the first friend node subset and the current second friend node in the second friend node subset to obtain personal interpersonal relationship information of each user node.
[0130] For example, in this embodiment, the personal interpersonal relationship information of each user node can be obtained by enumerating the nodes in the first friend node subset and the second friend node subset to perform node combination.
[0131] For example, enumerating the subcollection pairs <L i (u), R j (u)>, where L i (u) is the first subset of friend nodes, R j (u) is the second friend node subset, 1≤i≤k, 1≤j≤t.
[0132] Then, for each subset pair <L i (u), R j (u)> to obtain the personal interpersonal relationship information of each user node, for example, to obtain the personal interpersonal relationship information of user node u <(x, y, u>, where x is L i (u) is the node in R j Nodes in (u).
[0133] (iv) Generate overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node.
[0134] For example, if there are two personal interpersonal relationship information, namely <(x, y), u> and <(x, y), v>, then a new two personal interpersonal relationship information <(x, y), {u, v}> is constructed. The specific construction method can refer to step 105 and will not be repeated here.
[0135] As can be seen from the above, this embodiment can obtain the social network relationship information of the target application, and determine at least one friend node of each user node based on the social network relationship information; generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes; perform node combination based on the first friend node set and the second friend node set of each user node to obtain the personal interpersonal relationship information of each user node; generate the overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node.
[0136] In the embodiment of the present application, by combining the first friend node and the second friend node of the user node, the personal interpersonal relationship information of the user node can be directly obtained. Therefore, the solution can improve the efficiency of the interpersonal relationship information generation method.
[0137] In addition, this embodiment can split large nodes when processing large nodes, thereby reducing the computing time during distributed computing, thereby further improving the efficiency of the interpersonal relationship information generation method.
[0138] In order to better implement the above method, the embodiment of the present application also provides a device for generating interpersonal relationship information, which can be integrated in an electronic device, and the electronic device can be a terminal, a server, etc. Among them, the terminal can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop, or a personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers.
[0139] For example, in this embodiment, the method of the embodiment of the present invention is described in detail by taking the example of integrating the interpersonal relationship information generating device into the server.
[0140] For example, Figure 3a As shown, the interpersonal relationship information generating device may include an acquisition unit 301, a node unit 302, a collection unit 303, an information unit 304 and a total information unit 305 as follows:
[0141] (I) Acquisition unit 301:
[0142] The acquisition unit 301 is used to acquire social network relationship information of a target application, where the social network relationship information includes a plurality of user nodes.
[0143] (ii) Node unit 302:
[0144] The node unit 302 is used to determine at least one friend node of each user node according to the social network relationship information.
[0145] (III) Collection unit 303:
[0146] The collection unit 303 is used to generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes.
[0147] In some embodiments, the collection unit 303 may also be used to:
[0148] Obtaining a node filtering condition, where the node filtering condition includes a first node filtering condition and a second node filtering condition;
[0149] Perform node filtering on the first friend node in the first friend node set based on the first node filtering condition to obtain a filtered first friend node set;
[0150] Perform node filtering on the second friend nodes in the second friend node set based on the second node filtering condition to obtain a filtered second friend node set;
[0151] Based on the first friend node set and the second friend node set of each user node, the interpersonal relationship information of each user node is generated, including:
[0152] Based on the filtered first friend node set and the filtered second friend node set of each user node, the interpersonal relationship information of each user node is generated.
[0153] (IV) Information unit 304:
[0154] The information unit 304 is used to perform node combination according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node.
[0155] refer to Figure 3b In some embodiments, the information unit 304 may include a current user subunit 3041, a current collection subunit 3042, a current node subunit 3043, and a sub-information subunit 3044 as follows:
[0156] (1) Current user subunit 3041:
[0157] The current user subunit 3041 is used to determine the current user node in the social network relationship information.
[0158] (2) Current collection subunit 3042:
[0159] The current set subunit 3042 is used to determine a first friend node set and a second friend node set of the current user node.
[0160] (3) Current node subunit 3043:
[0161] The current node subunit 3043 is used to determine the current first friend node in the first friend node set and the current second friend node in the second friend node set.
[0162] In some embodiments, the current node subunit 3043 may also be used to determine a current first friend node in the first friend node subset and a current second friend node in the second friend node subset.
[0163] In some embodiments, the current node subunit 3043 may also be used to:
[0164] Obtaining the set size of the first friend node set and the set size of the second friend node set;
[0165] When the set size of the first friend node set is greater than a preset threshold, splitting the first friend node set to obtain a plurality of first friend node subsets of the first friend node set;
[0166] When the set size of the second friend node set is greater than a preset threshold, splitting the second friend node set to obtain a plurality of second friend node subsets of the second friend node set;
[0167] (4) Sub-information sub-unit 3044:
[0168] The sub-information sub-unit 3044 is used to generate interpersonal relationship sub-information of the current user node according to the current first friend node, the current second friend node and the current user node.
[0169] In some embodiments, the sub-information subunit 3044 may also be used to:
[0170] The current user node generates the interpersonal relationship sub-information of the current user node, including:
[0171] Get interpersonal relationship filter conditions;
[0172] When the interpersonal relationship sub-information of the current user node meets the interpersonal relationship filtering condition, the interpersonal relationship sub-information of the current user node is generated according to the current first friend node, the current second friend node and the current user node.
[0173] (V) General information unit 305:
[0174] The overall information unit 305 is used to generate overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node.
[0175] In some embodiments, the total information unit 305 may include a sorting subunit and a total information subunit as follows:
[0176] (1) Sorting subunit:
[0177] The sorting subunit is used to sort the personal interpersonal relationship information of each user node to obtain sorted personal interpersonal relationship information.
[0178] (2) General information subunit:
[0179] The total information subunit is used to generate the overall user interpersonal relationship information of the target application based on the sorted personal interpersonal relationship information.
[0180] In some embodiments, the total information subunit may also be used to:
[0181] Determining a current first node and a current second node in the social network relationship information;
[0182] Determining multiple target interpersonal relationship information corresponding to the current first node and the current second node in the sorted personal interpersonal relationship information;
[0183] The information of multiple target interpersonal relationships is integrated to obtain the overall user interpersonal relationship information of the target application.
[0184] In specific implementation, the above units can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units can refer to the previous method embodiments, which will not be repeated here.
[0185] As can be seen from the above, the interpersonal relationship information generating device of this embodiment obtains the social network relationship information of the target application by the acquisition unit, and the social network relationship information includes multiple user nodes; the node unit determines at least one friend node of each user node according to the social network relationship information; the collection unit generates the first friend node set and the second friend node set corresponding to each user node based on the friend node; the information unit combines nodes according to the first friend node set and the second friend node set of each user node to obtain the personal interpersonal relationship information of each user node; the total information unit generates the overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node. In the embodiment of the present application, the personal interpersonal relationship information of the user node can be directly obtained by combining the first friend node and the second friend node of the user node. Therefore, the scheme can improve the efficiency of the interpersonal relationship information generation method.
[0186] The embodiment of the present application also provides a server, which can be a single server or a server cluster composed of multiple servers. In some embodiments, the interpersonal relationship information generation device can also be integrated into multiple servers, for example, the interpersonal relationship information generation device can be integrated into multiple servers, and the interpersonal relationship information generation method of the present application can be implemented by multiple servers.
[0187] In this embodiment, a single server is used as an example for detailed description. Figure 4 As shown, it shows a schematic diagram of the structure of the server involved in the embodiment of the present application, specifically:
[0188] The server may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input module 404, and a communication module 405. Those skilled in the art will appreciate that Figure 4 The server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0189] The processor 401 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the server and processes data, thereby monitoring the server as a whole. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0190] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0191] The server also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 may be logically connected to the processor 401 through a power management system, so that the power management system can manage charging, discharging, power consumption, and other functions. The power supply 403 may also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0192] The server may further include an input module 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0193] The server may further include a communication module 405. In some embodiments, the communication module 405 may include a wireless module. The server may perform short-range wireless transmission through the wireless module of the communication module 405, thereby providing wireless broadband Internet access for the user. For example, the communication module 405 may be used to help the user send and receive emails, browse web pages, and access streaming media.
[0194] Although not shown, the server may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the server will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:
[0195] Acquire social network relationship information of a target application, where the social network relationship information includes multiple user nodes;
[0196] Determine at least one friend node of each user node according to the social network relationship information;
[0197] Generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes;
[0198] Perform node combination according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node;
[0199] The overall user interpersonal relationship information of the target application is generated based on the personal interpersonal relationship information of each user node.
[0200] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0201] As can be seen from the above, the embodiment of the present application can obtain the social network relationship information of the target application, and the social network relationship information includes multiple user nodes; determine at least one friend node of each user node based on the social network relationship information; generate the first friend node set and the second friend node set corresponding to each user node based on the friend node; perform node combination based on the first friend node set and the second friend node set of each user node to obtain the personal interpersonal relationship information of each user node; generate the overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node. In the embodiment of the present application, by combining the first friend node and the second friend node of the user node, the personal interpersonal relationship information of the user node can be directly obtained. Therefore, the scheme can improve the efficiency of the interpersonal relationship information generation method.
[0202] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0203] To this end, an embodiment of the present application provides a storage medium in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the interpersonal relationship information generation methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0204] Acquire social network relationship information of a target application, where the social network relationship information includes multiple user nodes;
[0205] Determine at least one friend node of each user node according to the social network relationship information;
[0206] Generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes;
[0207] Perform node combination according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node;
[0208] The overall user interpersonal relationship information of the target application is generated based on the personal interpersonal relationship information of each user node.
[0209] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0210] Since the instructions stored in the storage medium can execute the steps in any one of the interpersonal relationship information generation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the interpersonal relationship information generation methods provided in the embodiments of the present application can be achieved. For details, please refer to the previous embodiments and will not be repeated here.
[0211] The above is a detailed introduction to a method and device for generating interpersonal relationship information provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for generating interpersonal relationship information, characterized in that: include: Acquire social network relationship information of a target application, wherein the social network relationship information includes a plurality of user nodes; Determine at least one friend node of each user node according to the social network relationship information; Generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes; Perform node combination according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node with the user node as a common friend, where the common friend refers to a friend of two other user nodes at the same time; Generating overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node; The first friend node set includes a first friend node subset Li(u), the second friend node set includes a second friend node subset Rj(u), and the node combination is performed according to the first friend node set and the second friend node set of each user node to obtain personal interpersonal relationship information of each user node with the user node as a common friend, including: Combine the nodes in the first friend node subset Li(u) and the second friend node subset Rj(u) to obtain a subset pair<Li(u),Rj(u)> ; According to the subset<Li(u),Rj(u)> Enumerate and obtain the personal interpersonal relationship information <(x, y), u> of user node u, where y is a node in Rj(u); The personal interpersonal relationship information of each user node includes the personal interpersonal relationship information <(x, y), u> of user node u and the personal interpersonal relationship information <(x, y), v> of user node v, the overall user interpersonal relationship information includes the common personal interpersonal relationship information between user nodes, and the overall user interpersonal relationship information of the target application is generated based on the personal interpersonal relationship information of each user node, including: According to the personal interpersonal relationship information <(x, y), u> of user node u and the personal interpersonal relationship information <(x, y), v> of user node v, the common personal interpersonal relationship information <(x, y), {u, v}> of user node u and user node v is constructed, where the relationship between user node u and user node v is a friend relationship or a non-friend relationship.
2. The method for generating interpersonal relationship information according to claim 1, wherein: The personal interpersonal relationship information includes a plurality of interpersonal relationship sub-information, and the personal interpersonal relationship information of each user node is obtained by combining the first friend node set and the second friend node set of each user node, including: Determining a current user node in the social network relationship information; Determine a first friend node set and a second friend node set of the current user node; Determine a current first friend node in the first friend node set and a current second friend node in the second friend node set; According to the current first friend node, the current second friend node and the current user node, the interpersonal relationship sub-information of the current user node is generated.
3. The method for generating interpersonal relationship information according to claim 2, wherein: After determining the first friend node set and the second friend node set of the current user node, the method further includes: Obtaining the set size of the first friend node set and the set size of the second friend node set; When the set size of the first friend node set is greater than a preset threshold, splitting the first friend node set to obtain a plurality of first friend node subsets of the first friend node set; When the set size of the second friend node set is greater than a preset threshold, splitting the second friend node set to obtain a plurality of second friend node subsets of the second friend node set; The determining the current first friend node in the first friend node set and the current second friend node in the second friend node set includes: Determine a current first friend node in the first friend node subset and a current second friend node in the second friend node subset.
4. The method for generating interpersonal relationship information according to claim 2, wherein: Generate interpersonal relationship sub-information of the current user node according to the current first friend node, the current second friend node and the current user node, including: Get interpersonal relationship filter conditions; When the interpersonal relationship sub-information of the current user node meets the interpersonal relationship filtering condition, the interpersonal relationship sub-information of the current user node is generated according to the current first friend node, the current second friend node and the current user node.
5. The method for generating interpersonal relationship information according to claim 1, wherein: After generating a first friend node set and a second friend node set corresponding to each user node based on the friend nodes, the method further includes: Obtaining a node filtering condition, where the node filtering condition includes a first node filtering condition and a second node filtering condition; Perform node filtering on the first friend nodes in the first friend node set based on the first node filtering condition to obtain a filtered first friend node set; Perform node filtering on the second friend nodes in the second friend node set based on the second node filtering condition to obtain a filtered second friend node set; The generating of the interpersonal relationship information of each user node based on the first friend node set and the second friend node set of each user node includes: Based on the filtered first friend node set and the filtered second friend node set of each user node, the interpersonal relationship information of each user node is generated.
6. The method for generating interpersonal relationship information according to claim 1, wherein: Generating overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node includes: Sort the personal interpersonal relationship information of each user node to obtain sorted personal interpersonal relationship information; The overall user interpersonal relationship information of the target application is generated based on the sorted personal interpersonal relationship information.
7. The method for generating interpersonal relationship information according to claim 6, wherein: Generating overall user interpersonal relationship information of the target application based on the sorted personal interpersonal relationship information includes: Determining a current first node and a current second node in the social network relationship information; Determining a plurality of target interpersonal relationship information corresponding to the current first node and the current second node in the sorted personal interpersonal relationship information; The plurality of target interpersonal relationship information are integrated to obtain overall user interpersonal relationship information of the target application.
8. A device for generating interpersonal relationship information, characterized in that: include: An acquisition unit, configured to acquire social network relationship information of a target application, wherein the social network relationship information includes a plurality of user nodes; A node unit, configured to determine at least one friend node of each user node according to the social network relationship information; A collection unit, configured to generate a first friend node set and a second friend node set corresponding to each user node based on the friend nodes; An information unit, used to combine nodes according to the first friend node set and the second friend node set of each user node, to obtain personal interpersonal relationship information of each user node that has the user node as a common friend, where the common friend refers to a friend of two other user nodes at the same time; A total information unit, used to generate overall user interpersonal relationship information of the target application based on the personal interpersonal relationship information of each user node; The first friend node set includes a first friend node subset Li(u), the second friend node set includes a second friend node subset Rj(u), and the information unit is used to: Combine the nodes in the first friend node subset Li(u) and the second friend node subset Rj(u) to obtain a subset pair<Li(u),Rj(u)> ; According to the subset<Li(u),Rj(u)> Enumerate and obtain the personal interpersonal relationship information <(x, y), u> of user node u, where y is a node in Rj(u); The personal interpersonal relationship information of each user node includes the personal interpersonal relationship information <(x, y), u> of user node u and the personal interpersonal relationship information <(x, y), v> of user node v. The overall user interpersonal relationship information includes the common personal interpersonal relationship information between user nodes. The overall information unit is used for: According to the personal interpersonal relationship information <(x, y), u> of user node u and the personal interpersonal relationship information <(x, y), v> of user node v, the common personal interpersonal relationship information <(x, y), {u, v}> of user node u and user node v is constructed, where the relationship between user node u and user node v is a friend relationship or a non-friend relationship.
9. The interpersonal relationship information generating device according to claim 8, characterized in that: The information unit includes: A current user subunit, used to determine a current user node in the social network relationship information; A current set subunit, used to determine a first friend node set and a second friend node set of the current user node; A current node subunit, used to determine a current first friend node in the first friend node set and a current second friend node in the second friend node set; The sub-information sub-unit is used to generate the interpersonal relationship sub-information of the current user node according to the current first friend node, the current second friend node and the current user node.
10. The interpersonal relationship information generating device according to claim 9, characterized in that: The current node subunit is further used for: Obtaining the set size of the first friend node set and the set size of the second friend node set; When the set size of the first friend node set is greater than a preset threshold, splitting the first friend node set to obtain a plurality of first friend node subsets of the first friend node set; When the set size of the second friend node set is greater than a preset threshold, splitting the second friend node set to obtain a plurality of second friend node subsets of the second friend node set; The determining the current first friend node in the first friend node set and the current second friend node in the second friend node set includes: Determine a current first friend node in the first friend node subset and a current second friend node in the second friend node subset.
