CN109712012B - Social network partitioning method, device, equipment and storage medium - Google Patents

Social network partitioning method, device, equipment and storage medium Download PDF

Info

Publication number
CN109712012B
CN109712012B CN201811137294.7A CN201811137294A CN109712012B CN 109712012 B CN109712012 B CN 109712012B CN 201811137294 A CN201811137294 A CN 201811137294A CN 109712012 B CN109712012 B CN 109712012B
Authority
CN
China
Prior art keywords
vertex
social
sub
collection
social network
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811137294.7A
Other languages
Chinese (zh)
Other versions
CN109712012A (en
Inventor
陆玉恒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Dajiaying Information Technology Co Ltd
Original Assignee
Shanghai Dajiaying Information Technology Co Ltd
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 Shanghai Dajiaying Information Technology Co Ltd filed Critical Shanghai Dajiaying Information Technology Co Ltd
Priority to CN201811137294.7A priority Critical patent/CN109712012B/en
Publication of CN109712012A publication Critical patent/CN109712012A/en
Application granted granted Critical
Publication of CN109712012B publication Critical patent/CN109712012B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a social network dividing method, a social network dividing device, social network dividing equipment and a storage medium. The method comprises the following steps: determining, in the social network, a first vertex having a target attribute; determining a sub-social collection comprising the first vertex; and eliminating the sub-social collection in the social network to obtain an updated social network, and returning to execute the first vertex determining operation until the updated social network does not have the vertex with the target attribute. The method provided by the embodiment divides a plurality of local social groups in the social network, accords with the distributed characteristics of social group dispersion in real life, and improves the accuracy of social network division.

Description

Social network partitioning method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to graph theory technology, in particular to a social network dividing method, device, equipment and storage medium.
Background
In contrast to traditional forums and blogs, social networks are bridges between the virtual world and the real world, and establish relationships between people in real life on the internet. Processing a social network with a computer often treats the entire social network as a structure of a graph, each person being a vertex in the graph, and the relationship between people being edges between vertices.
In some situations, it is often required to find out a social group meeting the requirements in a social network diagram, for example, an authenticated member group of a certain website, and by performing advertisement delivery and information promotion on the authenticated member group, the non-authenticated member can be converted into an authenticated member, so that the social group scale is enlarged. In the prior art, social groups are difficult to accurately divide in a social network, so that advertisement delivery and information popularization are inaccurate, funds and manpower resources are wasted.
Disclosure of Invention
The embodiment of the invention provides a social network dividing method, a social network dividing device, social network dividing equipment and a storage medium, so that accuracy of social network dividing is improved.
In a first aspect, an embodiment of the present invention provides a social network dividing method, including:
determining, in the social network, a first vertex having a target attribute;
determining a sub-social collection comprising the first vertex;
and eliminating the sub-social collection in the social network to obtain an updated social network, and returning to execute the first vertex determining operation until the updated social network does not have the vertex with the target attribute.
In a second aspect, an embodiment of the present invention further provides a social network dividing apparatus, including:
A first determining module, configured to determine, in a social network, a first vertex having a target attribute;
a second determining module, configured to determine a sub-social collection including the first vertex;
and the updating module is used for eliminating the sub-social collection in the social network to obtain an updated social network, and returning to execute the first vertex determining operation until the vertex with the target attribute does not exist in the updated social network.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the social network partitioning method of any of the embodiments.
In a fourth aspect, embodiments of the present invention further provide a computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the social network partitioning method according to any of the embodiments.
In the embodiment, a first vertex with a target attribute is determined in a social network, a sub-social collection containing the first vertex is determined, a local social group containing the first vertex is further divided from the social network, and the sub-social collection is removed from the social network to obtain an updated social network; and returning to the determining operation of the first vertex until the vertex with the target attribute does not exist in the social network, so that a plurality of local social groups are divided in the social network, the distributed characteristics of the dispersion of the social groups in real life are met, and the accuracy of the division of the social network is further improved.
Drawings
FIG. 1 is a flow chart of a method for partitioning a social network according to an embodiment of the present invention;
FIG. 2a is a flowchart of a social network partitioning method according to a second embodiment of the present invention;
fig. 2b is a schematic structural diagram of a social network according to a second embodiment of the present invention;
FIG. 3 is a flowchart of a social network partitioning method provided in a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a social network dividing apparatus according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention.
Detailed Description
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be further noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a social network partitioning method according to an embodiment of the present invention, where the method may be applicable to a case of partitioning a sub-social set meeting requirements in a social network, and the method may be performed by a social network partitioning device, and specifically includes the following steps:
S110, determining a first vertex with a target attribute in the social network.
Social networks in this embodiment refer to a network of relationships formed from person to person based on social activity. When a computer is used to process a social network, the whole social network is regarded as a structure of a graph, each person is a vertex in the graph, and the relationship between people is an edge between vertices. For example, the relationship between people includes presence in the address book of the other party, the occurrence of a call, or the presence of a business transaction.
In this embodiment, the social network includes a plurality of vertices having target attributes and at least one vertex not having target attributes. The attribute of the vertex is the attribute of the user corresponding to the vertex. The vertex with the target attribute is the vertex of interest in the social network, for example, the target attribute is the authenticated user, the user a is the authenticated user, and the vertex corresponding to the user a is the vertex with the authenticated user attribute.
In addition to the plurality of vertices having the target attribute, the social network further includes at least one vertex having no target attribute, alternatively, the vertex having no target attribute may be a vertex having an attribute other than the target attribute or a vertex having no attribute. For example, user B is a registered user, and not an authenticated user, then the vertex corresponding to user B is the vertex with the registered user attribute, i.e., the vertex without the authenticated user attribute. For another example, if the user C does not have any attribute, the vertex corresponding to the user C is regarded as a vertex having no attribute of the authenticated user.
In this embodiment, a vertex with a target attribute is first selected as a first vertex in the social network.
S120, determining a sub-social collection containing the first vertex.
Wherein the sub-social collection includes a first vertex and other vertices. Preferably, the other vertices are vertices associated with the first vertex having the target property.
In a specific embodiment, at least one second vertex associated with the first vertex and having a target attribute is determined, and the at least one second vertex and the first vertex form a sub-social set.
Optionally, the vertex associated with the first vertex is first determined. After determining the vertex associated with the first vertex, a vertex having the target attribute is determined among the associated vertices as the second vertex. The number of the second vertexes is at least one, and the first vertexes and the at least one second vertexes form a sub-social collection. In this way, a sub-social collection is obtained that is partitioned from the social network. Execution continues with S130, in view of the possible presence of other sub-social collections in the social network.
The vertex associated with the first vertex may be a vertex directly connected to the first vertex, which is also referred to as a neighboring point of the first vertex. The relationship between the vertex directly connected with the first vertex and the first vertex is the most intimate, and the sub-social collection formed by the method almost coincides with the social group in real life.
S130, eliminating the sub-social collection in the social network to obtain the updated social network.
S140, judging whether the updated social network comprises a vertex with a target attribute, if so, namely, if the updated social network comprises the vertex with the target attribute, jumping to the step S110; if not, i.e. if the updated social network does not include vertices with the target attributes, then step S150 is skipped.
S150, ending the operation.
Removing the sub-social collection in the social network includes removing each vertex in the sub-social collection in the social network, and connecting relationships with each vertex in the sub-social collection.
After obtaining the updated social network, judging whether the updated social network includes a vertex with the target attribute, if so, returning to S110, determining a first vertex with the target attribute from the updated social network, and then executing the subsequent steps. In this way, a further sub-social collection may be obtained. If not, the vertex of interest does not exist in the updated social network, and no division is needed. Further, the remaining vertices in the social network may be formed into an external set. Since the vertices with the target attributes do not exist in the social network at this time, the remaining vertices in the social network can be considered to be vertices without the target attributes, and the remaining vertices without the target attributes are formed into an external set.
In the embodiment, a first vertex with a target attribute is determined in a social network, a sub-social collection containing the first vertex is determined, a local social group containing the first vertex is further divided from the social network, and the sub-social collection is removed from the social network to obtain an updated social network; and returning to the determining operation of the first vertex until the vertex with the target attribute does not exist in the social network, so that a plurality of local social groups are divided in the social network, the distributed characteristics of the dispersion of the social groups in real life are met, and the accuracy of the division of the social network is further improved.
Further, by determining at least one second vertex which is associated with the first vertex and has the target attribute, and forming the sub-social collection by the at least one second vertex and the first vertex, a local social group which takes the first vertex as a center and has the target attribute is divided, and the local social group is more in line with the social group in real life due to the fact that the first vertex is taken as a center, the second vertex has the association relationship with the first vertex and has the target attribute.
Example two
The present embodiment is further optimized based on the optional implementation manners of the foregoing embodiments, specifically, after determining the sub-social collection including the first vertex, other vertices with target attributes that are closer to the sub-social collection are selectively divided into the sub-social collection. Fig. 2a is a flowchart of a social network dividing method according to a second embodiment of the present invention, including the following steps:
s210, determining a first vertex with a target attribute in the social network.
S220, determining a sub-social collection containing the first vertex.
S210 and S220 are the same as S110 and S120 in the above embodiments, respectively, and are not described here again.
S230, determining a third vertex which does not have the target attribute from vertices associated with any vertex in the sub-social collection.
S240, determining at least one fourth vertex which has the target attribute and is not in the sub-social collection in the vertexes associated with the third vertex.
In this embodiment, after forming the sub-social collection, vertices which are associated with the sub-social collection, have target properties, and are not in the sub-social collection are divided into the sub-social collection, so as to further expand the sub-social collection, reduce the number of the sub-social collection, and further reduce the calculated amount; meanwhile, the sub-social collection is further perfected to be closer to a social group in real life.
In this embodiment, there may be multiple vertices in the sub-social collection. Based on this, in the social network other than the sub-social collection, a vertex associated with any one vertex in the sub-social collection is determined as a third vertex. Alternatively, the vertex associated with any vertex in the sub-social collection may be a vertex directly connected to any vertex in the sub-social collection. Accordingly, the vertex associated with the third vertex may be a vertex directly connected to the third vertex.
In one example, as shown in FIG. 2B, vertex A is a vertex in the sub-social collection, vertex A connects vertex B, which does not have a target attribute, vertex B connects vertex C and vertex D, which do have a target attribute, and vertex E, which does not have a target attribute. First, among vertices directly connected to vertex a, vertex B having no target attribute is determined. The vertices directly connected with the vertex B comprise a vertex A, a vertex C, a vertex D and a vertex E, and among the 4 vertices, the vertex C and the vertex D have target attributes and are not in the sub-social collection, and then the vertex C and the vertex D are taken as fourth vertices.
S250, selecting a vertex meeting a preset requirement from at least one fourth vertex, and dividing the vertex into the sub-social collection.
The developer can set preset requirements independently, for example, all the fourth vertices can be divided into the sub-social sets, and a preset number of fourth vertices can be selected randomly to be divided into the sub-social sets.
Specifically, in the social network, determining a target network composed of vertexes with target attributes; calculating the path length of each fourth vertex and the first vertex in the target network; and selecting the vertex with the path length meeting the length requirement with the first vertex, and dividing the vertex into the sub-social collection. The connection relation between the vertexes in the target network is the same as the connection relation of the corresponding vertexes in the social network. In the target network, the paths of the fourth vertex and the first vertex are all vertexes with target attributes. In this embodiment, the edges between the connected vertices have the same weight, and based on this, the path length between the fourth vertex and the first vertex refers to the number of edges included in the shortest path between the fourth vertex and the first vertex. Optionally, the developer may autonomously set a preset requirement, for example, divide the fourth vertex having the path length with the first vertex less than or equal to the length threshold into the sub-social collection. Wherein the length threshold is set to 3, 4, 5, etc. For another example, a fourth vertex having the shortest path length to the first vertex is partitioned into the sub-social collection.
In this way, although the fourth vertex is spaced from the sub-social collection by the third vertex which does not have the target attribute, the fourth vertex has an association relationship with the sub-social collection, and the third vertex also has an association relationship with the fourth vertex, so that the fourth vertex is closer to the sub-social collection and can be divided into the sub-social collection.
S260, eliminating the sub-social collection in the social network to obtain the updated social network.
S270, judging whether the updated social network comprises a vertex with a target attribute, if so, jumping to the step S210; if not, go to step S280.
S280, ending the operation.
In the embodiment, determining a third vertex without a target attribute in vertices associated with any vertex in the sub-social collection; determining, among vertices associated with the third vertex, at least one fourth vertex having a target attribute that is not in the sub-social set; selecting vertexes meeting preset requirements from at least one fourth vertex, and dividing the vertexes into the sub-social sets, so that the sub-social sets are further expanded, the number of the sub-social sets is reduced, and the calculated amount is further reduced; meanwhile, the sub-social collection is further perfected so as to be closer to social groups in real life; the fourth vertex with the path length smaller than or equal to the length threshold value is divided into the sub-social collection, or the fourth vertex with the shortest path length with the first vertex is divided into the sub-social collection, so that the distance between the fourth vertex divided into the sub-social collection and the first vertex is ensured to be close enough, and the accuracy of sub-social collection division is improved.
Example III
The present embodiment is further optimized based on the optional implementation manners of the foregoing embodiment, and before determining the first vertex with the target attribute, further includes: in the social network, isolated vertices and/or leaf vertices with target attributes are culled. Fig. 3 is a flowchart of a social network dividing method provided in the third embodiment of the present invention, which specifically includes the following steps:
s300, starting.
S310, judging whether an isolated vertex and/or a leaf vertex with a target attribute exists in the social network, if so, namely, if the isolated vertex and/or the leaf vertex with the target attribute exists in the social network, jumping to S320, otherwise, if not, namely, if not, the isolated vertex and/or the leaf vertex with the target attribute does not exist in the social network, jumping to S330.
S320, eliminating isolated vertexes and/or leaf vertexes with target attributes in the social network, and continuing to execute S330.
Wherein, the isolated vertex refers to the vertex with 0, and the leaf vertex refers to the vertex with 1. Since the isolated vertex is not connected with any vertex, the leaf vertex is connected with only one vertex, the connection relationship is too simple, and if the isolated vertex or the leaf vertex is selected as the first vertex, only one or two vertices in the formed sub-social collection can be caused, so that the connection relationship has no practical meaning. Based on this, the isolated vertices and/or leaf vertices with target attributes are culled before the first vertex is determined.
S330, judging whether the vertex with the target attribute exists in the social network, if so, namely, the vertex with the target attribute exists in the social network, continuing to execute S340, and if not, namely, the vertex with the target attribute does not exist in the social network, jumping to S370.
S340, determining a first vertex with the target attribute in the social network.
S350, determining a sub-social collection containing the first vertex in the social network.
S360, eliminating the sub-social collection in the social network to obtain the updated social network. Execution returns to S310.
And S370, ending the operation, or simultaneously forming the rest vertexes in the social network into an external set.
In this embodiment, by eliminating isolated vertices and/or leaf vertices with target attributes, only one or two vertices in the sub-social collection are avoided, so that the sub-social collection is ensured to include enough vertices, and the sub-social collection has practical significance.
On the basis of the above embodiments, after the division of the social network is completed, the users may be converted from not having the target attribute to having the target attribute due to interactions and diffusion between the users. For example, the original registered user a is converted into an authenticated user with the promotion of the authenticated user B. To facilitate such advantageous transformations, the present embodiment provides preset elements to the user that facilitates such advantageous transformations for motivation.
Specifically, after the updated social network does not have the vertex with the target attribute, the method further includes: obtaining a fifth vertex converted from not having the target attribute to having the target attribute; acquiring a sub-social collection associated with the fifth vertex; and providing the preset elements to the users corresponding to the vertexes in the sub-social collection.
Optionally, the existing attributes of the vertex that does not have the target attribute are retrieved at intervals of a preset duration, such as one week, 10 days, and one month, and if the vertex is converted from not having the target attribute to having the target attribute, the vertex is regarded as a fifth vertex. And then, acquiring the sub-social collection where the vertex with the target attribute is located, which is associated with the fifth vertex, as the sub-social collection associated with the fifth vertex. Wherein, the vertex associated with the fifth vertex is a vertex directly connected with the fifth vertex. Alternatively, the preset element may be a gift, a service, money, or the like.
Further optionally, providing the preset element to the user corresponding to each vertex in the sub-social collection includes: acquiring a first excitation coefficient corresponding to the first vertex and a second excitation coefficient corresponding to other vertices in the sub-social collection; providing preset elements matched with the first excitation coefficients to users corresponding to the first vertexes; and providing the preset elements matched with the second excitation coefficients to the users corresponding to other vertexes in the sub-social collection. Wherein the first excitation coefficient is greater than the second excitation coefficient, and accordingly, the value of the preset element matching the first excitation coefficient is greater than the value of the preset element matching the second excitation coefficient. Therefore, according to the mode that the first vertex is compensatively stimulated and decreased to other vertices in the sub-social collection, the advertiser effect of the corresponding user of the first vertex, the relation effect between the other vertices and the external collection and the vein effect are exerted to the maximum extent.
On the basis of the above embodiments, determining the first vertex having the target attribute in the social network includes determining a center vertex having the target attribute, where the center vertex is a vertex having a higher centrality in the social network, that is, having a certain influence and importance in the social network. The social network is divided based on the center vertex, so that accuracy of network division can be effectively improved. Specifically, determining a center vertex with a target attribute includes the following five steps:
the first step: in a social network, a plurality of first vertices having target attributes are determined.
And a second step of: each sub-social collection respectively containing each first vertex is determined.
And a third step of: a set of connected branches for each graph composed of vertices associated with each sub-social collection, respectively, that do not have the target attribute is determined.
Fourth step: and obtaining the centrality of each first vertex according to each sub-social collection and the corresponding communication branch collection.
Fifth step: and selecting a vertex with centrality meeting the preset centrality requirement from the plurality of first vertexes as a central vertex.
For convenience of description and avoidance of ambiguity, a method of constructing a sub-social collection including a jth first vertex is described below by taking the jth first vertex of the plurality of first vertices as an example. Those skilled in the art can know the method for forming the sub-social collection including other vertices of the plurality of first vertices according to this method, and the description thereof will be omitted herein.
Optionally, each second vertex set associated with each first vertex and having the target attribute is determined, and each second vertex set and the corresponding first vertex form each sub-social set. A vertex associated with the first vertex is first determined. After determining the vertex associated with the first vertex, a vertex having the target attribute is determined among the associated vertices as a second vertex. The number of the second vertices is at least one, and for convenience of description and distinction, the totality of the at least one second vertex is referred to as a second vertex set. Then, the second vertex set and the first vertex form a sub-social set. The method for determining the second vertex is described in detail in the above embodiments, and will not be described herein.
For convenience of description and avoidance of ambiguity, a method for determining a connected branch set corresponding to a jth first vertex is also described below by taking the jth first vertex of the plurality of first vertices as an example.
Firstly, determining the vertex associated with any vertex in the sub-social collection corresponding to the j-th first vertex, and determining the vertex which does not have the target attribute in the vertex associated with any vertex. These graphs of points without target attributes include at least one communication branch, and the totality of at least one communication branch is referred to as a communication branch set.
The vertex associated with any vertex in the sub-social set may be a vertex directly connected to any vertex in the sub-social set, where the relevant description of the directly connected vertex is detailed in the foregoing, and is not repeated herein.
In this embodiment, the centrality of the first vertex is calculated by combining two factors, namely, the sub-social collection and the corresponding connected branch collection. In an alternative embodiment, the centrality index of each sub-social collection and the corresponding centrality index of the corresponding connected branch collection are combined, for example, the two are weighted and summed or multiplied to obtain the centrality of each first vertex. Center indicators include, but are not limited to, center of gravity, proximity center, vector feature center, and the like.
The research and development personnel can set preset centrality requirements autonomously, and optionally, a vertex with the greatest centrality is selected from a plurality of first vertexes as a central vertex; or, among the plurality of first vertexes, a vertex with centrality equal to or greater than a centrality threshold is selected as a central vertex. If there are a plurality of vertexes with the centrality greater than or equal to the centrality threshold, one vertex is selected as a central vertex, or the vertex with the greatest centrality is selected as the central vertex.
The centrality threshold may be set according to the importance degree of the vertex in the social network, and the greater the centrality threshold is, the higher the importance degree of the selected central vertex in the social network is.
In the embodiment, a plurality of first vertexes with target attributes are determined in a social network, sub-social sets respectively containing the first vertexes are determined, and connected branch sets of graphs which are associated with the sub-social sets and do not have the vertexes with the target attributes are formed; the centrality of each first vertex is obtained according to each sub-social collection and the corresponding communication branch collection, so that the centrality of the first vertex is obtained according to the inner collection and the outer collection, and the vertex with centrality meeting the preset centrality requirement is selected as the central vertex. The method for determining the center vertex fully considers the influence of the inner set and the outer set on the centrality of the first vertex, so that the determination of the center vertex is more accurate.
In an alternative embodiment, obtaining centrality of each first vertex according to each sub-social collection and the corresponding connected branch collection includes: calculating the concentration degree of each sub-social collection; calculating the aggregation degree of each communication branch set; and obtaining the centrality of each first vertex according to the aggregation degree of each sub-social collection and the aggregation degree of the corresponding communication branch collection.
Wherein, the aggregation degree of the sub-social collection refers to the aggregation degree of the top points in the sub-social collection. Alternatively, the degree of the first vertex (i.e. the number of edges connected by the first vertex) may be used as the aggregation degree of the sub-social collection, the average path length of the first vertex and the second vertex in the sub-social collection may be used as the aggregation degree of the sub-social collection, and the aggregation coefficient of the sub-social collection may be calculated by using the aggregation coefficient and the aggregation coefficient may be used as the aggregation degree.
Specifically, in graph theory, the aggregation factor (Clustering coefficient) is a measure of how much vertices in a graph tend to aggregate together. The aggregation factor includes a vertex aggregation factor for calculating an aggregation level of a vertex in the network and a network aggregation factor for calculating an aggregation level of the entire network. In this embodiment, the clustering coefficient of the sub-social collection refers to the clustering coefficient of the first vertex in the sub-social collection, and then the vertex clustering coefficient is preferably used for calculation.
Specifically, according to the vertex concentration coefficientComputing a sub-social collection M containing a jth first vertex j Is a coefficient of aggregation of (a).
Where i, j denotes a vertex number, specifically j denotes a number of a first vertex, and i denotes a number of a second vertex. M j The expression sub-social collection M j The number of vertices of V ij Representing a sub-social collection M j An edge between the jth first vertex and the ith second vertex, if an edge exists between the jth first vertex and the ith second vertex, V ij =1, if there is no edge between the jth first vertex and the ith second vertex, V ij =0. Based on this, the first and second light sources,representing a sub-social collection M j In the j-th first vertex and M j Sum of the number of edges between the-1 second vertices.
The aggregation degree of the communication branch set is obtained according to the aggregation degree of each communication branch in the communication branch set. For example, the aggregate degree of each connected branch is added, multiplied, or averaged to obtain the aggregate degree of the connected branch set. Alternatively, the degree of each vertex of the communication branch may be added as the aggregation degree of the communication branch, and the average path length between each vertex in the communication branch may be also used as the aggregation degree of the communication branch.
The aggregate degree of each sub-social collection may be referred to as the internal aggregate degree of the first vertex, and the aggregate degree of the connected branch collection may be referred to as the external aggregate degree of the first vertex. If the external concentration is large, it means that a large number of vertices which do not have the target attribute are distributed around the first vertex. On the one hand, in graph theory, these large numbers of vertices without target attributes also increase the concentration of the first vertex; on the other hand, in practical applications, these large numbers of vertices without target attributes make the first vertex more valuable to use. For example, if the first vertex corresponds to a person with authentication attribute and a plurality of persons without authentication attribute are distributed around the first vertex, if the first vertex is selected as a central vertex, and advertisement promotion is performed on the central vertex and the sub-social collection, the advertisement effect of the vertex and the vein effect of the corresponding sub-social collection can be fully exerted, the person without authentication attribute is promoted to be converted into a person with authentication attribute, and the scale of the sub-social collection is further enlarged.
Optionally, the aggregation degree of each sub-social collection and the aggregation degree of the corresponding connected branch collection are weighted and summed or multiplied to obtain the centrality of each first vertex.
Optionally, the aggregation degree of each sub-social collection and the aggregation degree of the corresponding communication branch collection may be weighted and summed to obtain centrality of each first vertex. The weight of the aggregation degree of the sub-social collection and the weight of the aggregation degree of the communication branch collection can be set according to an actual application scene, for example, in an application scene, the aggregation degree of the social group is emphasized, and the weight of the aggregation degree of the sub-social collection is enabled to be larger than the weight of the aggregation degree of the communication branch collection. For another application scenario, for example, the interaction between vertices of different attributes is emphasized, and the weight of the aggregation degree of the connected branch set is made larger than the weight of the aggregation degree of the sub-social set.
In the embodiment, the internal concentration degree of the first vertex in the sub-social collection is obtained by calculating the concentration degree of each sub-social collection; the external concentration degree of the first vertex in the social network is further obtained by calculating the concentration degree of each communication branch set; the centrality of each first vertex is obtained according to the aggregation degree of each sub-social collection and the aggregation degree of the corresponding communication branch collection, so that the centrality of the first vertex is obtained according to the internal aggregation degree and the external aggregation degree, and the vertex with the centrality meeting the preset centrality requirement is selected as the central vertex. The method for determining the center vertex fully considers the mutual influence among the vertexes of different attributes, so that the determination of the center vertex is more accurate.
In an alternative embodiment, calculating the aggregate degree of each set of connected branches includes: according to the vertex concentration coefficientCalculating a communication branch set C corresponding to the j-th first vertex j The aggregation coefficient of the kth communication branch; according to the connected branch set C corresponding to the j th first vertex j The aggregation coefficient of each communication branch in the tree is used for obtaining a communication branch set C corresponding to the jth first vertex j As a connected branch set C j Is a concentration of (3).
Wherein j represents the first vertex number, clique j,k Represents the kth communication branch in the communication branch set corresponding to the jth first vertex, |clique j,k I represents the connected branch clique j,k The number of vertices of V pq Represents a connected branch clique j,k The edge between the p-th vertex and the q-th vertex,represents a connected branch clique j,k The sum of the number of edges between the vertices of the graph.
Alternatively, use is made ofFor the connected branch set C corresponding to the j th first vertex j Each communication branch in the tree is weighted and averaged to obtain a communication branch set C corresponding to the jth first vertex j Is a coefficient of aggregation; wherein I C j I represents the connected branch set C j The number of communicating branches in the (c).
Wherein, ||clique j,k The number of vertices in each communication branch is used as the weight of each communication branch, namely the number of vertices in each communication branch is used as the corresponding communication The weight of the branch fully considers the scale of the communication branch, calculates the aggregation degree of the communication branch set, and improves the accuracy of the calculation of the aggregation degree of the communication branch set.
In an alternative embodiment, the centralization of each first vertex is obtained by multiplying the centralization coefficient of each sub-social collection by the centralization coefficient of the corresponding connected branch collection. Specifically, the centrality of the first vertex is
In the embodiment, the aggregation coefficient of the communication branch is calculated through the vertex aggregation coefficient, and then the aggregation coefficient of the communication branch set is obtained according to the aggregation coefficient of each communication branch, so that the accuracy of calculation of the aggregation degree of the communication branch set is improved; thereby improving the accuracy of the centrality calculation.
Example IV
Fig. 4 is a schematic structural diagram of a social network dividing apparatus according to a fourth embodiment of the present invention, including: a first determination module 41, a second determination module 42 and an update module 43.
A first determining module 41, configured to determine, in the social network, a first vertex having a target attribute;
a second determining module 42 for determining a sub-social collection comprising a first vertex;
the updating module 43 is configured to reject the sub-social collection in the social network to obtain an updated social network, and return to performing the determining operation of the first vertex by the first determining module 41 until no vertex with the target attribute exists in the updated social network.
In the embodiment, a first vertex with a target attribute is determined in a social network, a sub-social collection containing the first vertex is determined, a local social group containing the first vertex is further divided from the social network, and the sub-social collection is removed from the social network to obtain an updated social network; and returning to the determining operation of the first vertex until the vertex with the target attribute does not exist in the social network, so that a plurality of local social groups are divided in the social network, the distributed characteristics of the dispersion of the social groups in real life are met, and the accuracy of the division of the social network is further improved.
Further, by determining at least one second vertex which is associated with the first vertex and has the target attribute, and forming the sub-social collection by the at least one second vertex and the first vertex, a local social group which takes the first vertex as a center and has the target attribute is divided, and the local social group is more in line with the social group in real life due to the fact that the first vertex is taken as a center, the second vertex has the association relationship with the first vertex and has the target attribute.
In an alternative embodiment, second determination module 42, when determining the sub-social set that includes the first vertex, is specifically configured to: at least one second vertex associated with the first vertex and having a target attribute is determined, and the at least one second vertex and the first vertex form a sub-social collection.
In an alternative embodiment, the apparatus further comprises a third determining module and a dividing module. The third determination module, after determining the sub-social collection containing the first vertex, is to: determining a third vertex which does not have the target attribute in the vertices associated with any vertex in the sub-social collection; at least one fourth vertex having a target attribute that is not in the sub-social set is determined among vertices associated with the third vertex. The division module is used for: and selecting a vertex meeting a preset requirement from at least one fourth vertex, and dividing the vertex into the sub-social collection.
In an optional embodiment, the dividing module selects a vertex satisfying a preset requirement from at least one fourth vertex, and when dividing the vertex into the sub-social collection, the dividing module is specifically configured to: in the social network, determining a target network composed of vertexes with target attributes; calculating the path length of each fourth vertex and the first vertex in the target network; and selecting the vertex with the path length meeting the length requirement with the first vertex, and dividing the vertex into the sub-social collection.
In an alternative embodiment, the apparatus further comprises a culling module. The culling module is used for culling isolated vertexes and/or leaf vertexes with target attributes in the social network before determining the first vertexes with the target attributes.
In an optional embodiment, the apparatus further includes a providing module, configured to obtain, after no vertex having the target attribute exists in the updated social network, a fifth vertex converted from not having the target attribute to having the target attribute; acquiring a sub-social collection associated with the fifth vertex; and providing the preset elements to the users corresponding to the vertexes in the sub-social collection.
In an optional embodiment, the providing module is specifically configured to, when providing the preset element to the user corresponding to each vertex in the sub-social collection: acquiring a first excitation coefficient corresponding to the first vertex and a second excitation coefficient corresponding to other vertices in the sub-social collection; providing preset elements matched with the first excitation coefficients to users corresponding to the first vertexes; and providing the preset elements matched with the second excitation coefficients to the users corresponding to other vertexes in the sub-social collection.
The social network dividing device provided by the embodiment of the invention can execute the social network dividing method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example five
Fig. 5 is a schematic structural diagram of an electronic device according to a fifth embodiment of the present invention, and as shown in fig. 5, the electronic device includes a processor 50 and a memory 51; the number of processors 50 in the electronic device may be one or more, one processor 50 being taken as an example in fig. 5; the processor 50, the memory 51 in the electronic device may be connected by a bus or other means, for example in fig. 5.
The memory 51 is used as a computer readable storage medium for storing software programs, computer executable programs, and modules, such as program instructions/modules corresponding to the social network dividing method in the embodiment of the present invention (for example, the first determining module 41, the second determining module 42, and the updating module 43 in the social network dividing apparatus). The processor 50 executes various functional applications of the electronic device and data processing, i.e., implements the social network partitioning method described above, by running software programs, instructions, and modules stored in the memory 51.
The memory 51 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 51 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 51 may further include memory located remotely from processor 50, which may be connected to the electronic device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Example six
A sixth embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program for performing a social network partitioning method when executed by a computer processor, the method comprising:
determining, in the social network, a first vertex having a target attribute;
determining a sub-social collection containing a first vertex;
and eliminating the sub-social collection in the social network to obtain an updated social network, and returning to execute the determination operation of the first vertex until the vertex with the target attribute does not exist in the updated social network.
Of course, the computer program of the computer readable storage medium having the computer program stored thereon provided by the embodiments of the present invention is not limited to the above method operations, but may also perform the related operations in the social network partitioning method provided by any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., including several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to execute the method of the embodiments of the present invention.
It should be noted that, in the embodiment of the social network dividing apparatus, each included unit and module are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (9)

1. A method for social network partitioning, comprising:
determining a first vertex with a target attribute in a social network comprises determining a central vertex with the target attribute, wherein the social network refers to a relationship network formed by people based on social activities, and the attribute of the vertex is the attribute of a user corresponding to the vertex; the determining a center vertex having a target attribute includes:
In a social network, determining a plurality of first vertexes with target attributes, determining each sub-social collection respectively comprising each first vertex, and determining a connected branch collection of each graph which is respectively associated with each sub-social collection and is not provided with the vertexes with the target attributes; calculating the aggregation degree of each sub-social collection, calculating the aggregation degree of each communication branch collection, and obtaining the centrality of each first vertex according to the aggregation degree of each sub-social collection and the aggregation degree of the corresponding communication branch collection, wherein among a plurality of first vertices, the vertex with centrality meeting the preset centrality requirement is selected as a central vertex;
determining a sub-social set containing the first vertex, wherein the sub-social set comprises the first vertex and other vertices, wherein the other vertices are vertices associated with the first vertex and have target attributes;
removing the sub-social collection from the social network to obtain an updated social network, and returning to execute the first vertex determining operation until no vertex with the target attribute exists in the updated social network;
obtaining a fifth vertex converted from not having the target attribute to having the target attribute;
Acquiring a sub-social collection where the vertex with the target attribute is located, which is associated with the fifth vertex, as a sub-social collection associated with the fifth vertex;
and providing the preset elements to the users corresponding to the vertexes in the sub-social collection.
2. The method of claim 1, wherein the determining the sub-social collection containing the first vertex comprises:
at least one second vertex associated with the first vertex and having a target attribute is determined, and the at least one second vertex and the first vertex form a sub-social collection.
3. The method of claim 1, wherein after determining the sub-social collection containing the first vertex, before culling the sub-social collection, further comprising:
determining a third vertex which does not have the target attribute in the vertices associated with any vertex in the sub-social collection;
determining, among vertices associated with the third vertex, at least one fourth vertex having a target attribute that is not in the sub-social set;
and selecting a vertex meeting a preset requirement from at least one fourth vertex, and dividing the vertex into the sub-social collection.
4. The method of claim 3, wherein selecting a vertex satisfying a preset requirement from at least one fourth vertex, dividing the vertex into the sub-social collection, comprises:
In the social network, determining a target network composed of vertexes with target attributes;
calculating the path length of each fourth vertex and the first vertex in the target network;
and selecting the vertex with the path length meeting the length requirement with the first vertex, and dividing the vertex into the sub-social collection.
5. The method of claim 1, further comprising, prior to determining the first vertex having the target attribute:
in the social network, isolated vertices and/or leaf vertices with target attributes are culled.
6. The method of claim 1, wherein providing the preset element to the user corresponding to each vertex in the sub-social collection comprises:
acquiring a first excitation coefficient corresponding to the first vertex and a second excitation coefficient corresponding to other vertices in the sub-social collection;
providing preset elements matched with the first excitation coefficients to users corresponding to the first vertexes;
and providing the preset elements matched with the second excitation coefficients to the users corresponding to other vertexes in the sub-social collection.
7. A social network partitioning apparatus, comprising:
the first determining module is used for determining a first vertex with a target attribute in a social network, wherein the first vertex with the target attribute comprises a central vertex with the target attribute, the social network refers to a relationship network formed by people based on social activities, and the attribute of the vertex is the attribute of a user corresponding to the vertex; the determining a center vertex having a target attribute includes:
In a social network, determining a plurality of first vertexes with target attributes, determining each sub-social collection respectively comprising each first vertex, and determining a connected branch collection of each graph which is respectively associated with each sub-social collection and is not provided with the vertexes with the target attributes; calculating the aggregation degree of each sub-social collection, calculating the aggregation degree of each communication branch collection, and obtaining the centrality of each first vertex according to the aggregation degree of each sub-social collection and the aggregation degree of the corresponding communication branch collection, wherein among a plurality of first vertices, the vertex with centrality meeting the preset centrality requirement is selected as a central vertex;
a second determining module configured to determine a sub-social set including the first vertex, wherein the sub-social set includes the first vertex and other vertices, the other vertices being vertices associated with the first vertex and having target attributes;
the updating module is used for eliminating the sub-social collection in the social network to obtain an updated social network, and returning to execute the first vertex determining operation until the updated social network does not have the vertex with the target attribute;
the providing module is used for obtaining a fifth vertex converted from the non-target attribute to the target attribute after the vertex with the target attribute does not exist in the updated social network; acquiring a sub-social collection associated with the fifth vertex; and providing the preset elements to the users corresponding to the vertexes in the sub-social collection.
8. An electronic device, the electronic device comprising:
one or more processors;
a memory for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the social network partitioning method of any one of claims 1-6.
9. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements a social network partitioning method as claimed in any one of claims 1-6.
CN201811137294.7A 2018-09-28 2018-09-28 Social network partitioning method, device, equipment and storage medium Active CN109712012B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811137294.7A CN109712012B (en) 2018-09-28 2018-09-28 Social network partitioning method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811137294.7A CN109712012B (en) 2018-09-28 2018-09-28 Social network partitioning method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109712012A CN109712012A (en) 2019-05-03
CN109712012B true CN109712012B (en) 2024-01-30

Family

ID=66254114

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811137294.7A Active CN109712012B (en) 2018-09-28 2018-09-28 Social network partitioning method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109712012B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136303A (en) * 2011-11-24 2013-06-05 北京千橡网景科技发展有限公司 Method and equipment of dividing user group in social network service website
CN103995823A (en) * 2014-03-25 2014-08-20 南京邮电大学 Information recommending method based on social network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103136303A (en) * 2011-11-24 2013-06-05 北京千橡网景科技发展有限公司 Method and equipment of dividing user group in social network service website
CN103995823A (en) * 2014-03-25 2014-08-20 南京邮电大学 Information recommending method based on social network

Also Published As

Publication number Publication date
CN109712012A (en) 2019-05-03

Similar Documents

Publication Publication Date Title
CN109241415B (en) Project recommendation method and device, computer equipment and storage medium
Pal et al. Centrality measures, upper bound, and influence maximization in large scale directed social networks
CN109919316A (en) The method, apparatus and equipment and storage medium of acquisition network representation study vector
WO2015135321A1 (en) Method and device for mining social relationship based on financial data
CN110765117A (en) Fraud identification method and device, electronic equipment and computer-readable storage medium
WO2016015444A1 (en) Target user determination method, device and network server
TW201939400A (en) Method and device for determining group of target users
CN108959516B (en) Conversation message treating method and apparatus
US10469504B1 (en) Systems and methods for using one or more networks to assess a metric about an entity
CN112214499B (en) Graph data processing method and device, computer equipment and storage medium
CN111401700A (en) Data analysis method, device, computer system and readable storage medium
CN109120431B (en) Method and device for selecting propagation source in complex network and terminal equipment
CN107480205A (en) A kind of method and apparatus for carrying out data partition
CN107368499B (en) Client label modeling and recommending method and device
CN107222410B (en) Method, device, terminal and computer readable storage medium for link prediction
CN108710664A (en) A kind of hot word analysis method, computer readable storage medium and terminal device
CN116703682B (en) Government affair data platform based on deep learning
CN109783471A (en) Enterprise's portrait small routine method, apparatus, computer equipment and storage medium
CN113609345A (en) Target object association method and device, computing equipment and storage medium
CN109460490B (en) Method, device, equipment and storage medium for determining center vertex in social network
CN113033194A (en) Training method, device, equipment and storage medium of semantic representation graph model
CN109712012B (en) Social network partitioning method, device, equipment and storage medium
CN116861107A (en) Business content display method, device, equipment, medium and product
CN113448876B (en) Service testing method, device, computer equipment and storage medium
CN114139052B (en) Ranking model training method for intelligent recommendation, intelligent recommendation method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant