CN114020999A - Community structure detection method and system for movie social network - Google Patents

Community structure detection method and system for movie social network Download PDF

Info

Publication number
CN114020999A
CN114020999A CN202111221461.8A CN202111221461A CN114020999A CN 114020999 A CN114020999 A CN 114020999A CN 202111221461 A CN202111221461 A CN 202111221461A CN 114020999 A CN114020999 A CN 114020999A
Authority
CN
China
Prior art keywords
movie
social network
community
network
matrix
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.)
Pending
Application number
CN202111221461.8A
Other languages
Chinese (zh)
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.)
Shanxi University
Original Assignee
Shanxi University
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 Shanxi University filed Critical Shanxi University
Priority to CN202111221461.8A priority Critical patent/CN114020999A/en
Publication of CN114020999A publication Critical patent/CN114020999A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Economics (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Primary Health Care (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a community structure detection method and a community structure detection system for a movie social network, wherein the method comprises the following steps: acquiring a user data set, constructing a movie social network structure according to the concern relationship among users, taking the film watching data of the users as user node attributes, and establishing an adjacency matrix and an attribute matrix based on the movie social network structure and the user node attributes; based on the established adjacency matrix and attribute matrix, a film social network community structure detection model is established by using an automatic graph encoder; designing a joint optimization objective function for the constructed film social network community structure detection model, and performing model training by minimizing the joint optimization objective function; and detecting the community structure of the movie social network by using the trained detection model of the community structure of the movie social network, and outputting the detection result of the community structure of the movie social network. The method and the system can effectively and reliably divide the community structure in the movie social network.

Description

Community structure detection method and system for movie social network
Technical Field
The invention relates to the technical field of data mining, in particular to a community structure detection method and system for a movie social network.
Background
With the rapid development and wide application of computer network technology, more and more social networking platforms, such as Facebook, tremble, microblog and the like, appear in the internet field, and the social networking platforms rapidly develop and rise and gradually become an indispensable part of people's social life. The social network with large scale and various forms is generated based on different social platforms, the social network reflects the interactive relationship among social individuals, and the convenience of establishing connection and exchanging information by people is greatly improved. Movie social networks, a common virtual social network, have become the most popular social platform for tens of millions of movie lovers. For example, the bean is a community website, provides information on books, movies, music, and other works, and is a website with a distinctive feature in the web2.0 website. The broad bean movie is a product under the broad bean flag, is the biggest movie sharing and commenting community in China, and converges tens of millions of users of favorite movies, and the users establish contact through mutual attention, so that information transfer is realized. There is often an associative relationship between users having the same or similar interests, thus gathering together to form a community. The users in the same community are closely connected and frequently interacted, so that information transmission is facilitated, and interest communication of the users is facilitated. The method and the system for detecting the community structure in the film social network are beneficial to research on relevant tasks such as user interest analysis, interest community analysis and user film watching behavior prediction by researchers, can help websites to push interested films for users in time, and have important commercial value for accurate marketing of hospital line positioning user requirements.
Social networks in the real world contain rich node attribute information, and the attribute information also has a positive effect on the formation of community structures. The early community discovery methods mainly included: the method comprises a graph segmentation method, a hierarchical clustering method, a modularity optimization method and a label propagation method, wherein the methods generally discover communities based on the topological structure of a network, and ignore the important role of node attributes in community structure formation. Therefore, the invention provides a method and a system which can effectively fuse space structure information and node attribute information and realize reliable division of community structures in a movie social network.
Disclosure of Invention
The invention aims to provide a method and a system for detecting a community structure of a movie social network, which can effectively and reliably divide the community structure in the movie social network.
To solve the above technical problem, an embodiment of the present invention provides the following solutions:
in one aspect, a method for detecting a community structure of a movie social network is provided, which includes the following steps:
s10, acquiring a user data set, constructing a movie social network structure according to the concern relationship among users, taking the film watching data of the users as user node attributes, and establishing an adjacency matrix and an attribute matrix based on the movie social network structure and the user node attributes; the viewing data includes: movie name, movie genre, starring actors, region;
s20, constructing a film social network community structure detection model by using an automatic graph encoder based on the established adjacency matrix and attribute matrix;
s30, designing a joint optimization objective function for the constructed film social network community structure detection model, and performing model training by minimizing the joint optimization objective function;
and S40, detecting the community structure of the movie social network by using the trained detection model of the community structure of the movie social network, and outputting the detection result of the community structure of the movie social network.
Preferably, the step S10 specifically includes the following steps:
s11, acquiring a user data set from the movie social platform, constructing a movie social network structure according to the concern relationship among users, representing social network users as user nodes in the network, representing the concern relationship among the users as edges among the user nodes, and counting the number of videos of the usersAccording to the attribute as the user node; let network be G ═ V, { E, X, and1,v2,…,vNdenotes the set of N user nodes in the network, where the nth user is denoted as user node vn,1≤n≤N;E={e1,e2,…,eMDenotes the M edges existing between user nodes, where the M-th edge is denoted as emM is more than or equal to 1 and less than or equal to M; x is a user node attribute matrix of dimension NxD, the nth row X of whichn=[xn1,xn2,…,xnD]Representing user nodes v in a networknOf D attributes, where element xndRepresenting a user node vnD is more than or equal to 1 and less than or equal to D;
s12, constructing an N × N-dimensional adjacency matrix with network G ═ V, E, X, and marking the adjacency matrix as a, where the value of each element in a represents the adjacency relationship between two corresponding user nodes in network G ═ V, E, X, that is, element a in the ith row and jth column in aijRepresenting the ith user node v in the networkiAnd the jth user node vj1 ≦ i ≦ N,1 ≦ j ≦ N, if viAnd vjThere is an edge in between, then Aij1, otherwise Aij=0。
Preferably, the movie social network community structure detection model constructed in step S20 includes four parts, namely an encoder, a structure decoder, an attribute decoder, and a modularity optimizer; the step S20 specifically includes the following steps:
s21, the encoder encodes the movie social network G ═ V, E, X as an embedded vector in a low dimensional space, and uses a graph attention network with the same 2-layer structure as an encoder
Figure BDA0003312778600000031
As input, the formalization of the encoding process is shown as follows:
Figure BDA0003312778600000032
Figure BDA0003312778600000033
Figure BDA0003312778600000034
wherein the content of the first and second substances,
Figure BDA0003312778600000035
and
Figure BDA0003312778600000036
are respectively user nodes viThe low-dimensional embedded vector is obtained after passing through the attention network of the first layer diagram and the attention network of the second layer diagram; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2); alpha is alphaijAn attention coefficient, called normalized, defined by equation (4); w(0)And W(1)Respectively determining connection weight matrixes in the attention network of the first layer of graph and the attention network of the second layer of graph, wherein the connection weight matrixes are undetermined parameters and are determined by inputting a movie social network in the subsequent steps; z is a set of encoded embedded vectors, ZtRepresenting by user node vtEncoding the resulting embedded vector in a low-dimensional space, an
Figure BDA0003312778600000037
Figure BDA0003312778600000038
In the formula, LeakyReLU () is a nonlinear activation function, and is defined by formula (5); a is a weight vector; w is a weight matrix; x is the number ofiRepresenting a user node vi(ii) an attribute of (d); | | is a join operation;
Figure BDA0003312778600000039
in the formula, lambda is a negative input slope and is 0.2;
s22, the structure decoder reconstructs the embedded vector set Z into a network relation
Figure BDA00033127786000000310
Namely, it is
Figure BDA00033127786000000311
The structural decoder definition is shown in equation (6):
Figure BDA00033127786000000312
wherein δ () is a dirac function;
using the cross-entropy function as a loss function for the structure reconstruction, defined by equation (7):
Figure BDA00033127786000000313
s23, the attribute decoder uses a symmetrical 2-layer graph attention network in the encoder to reconstruct the attribute information of the user nodes, each layer uses the representation of the neighbor user nodes to reconstruct the attribute of the nodes, and the decoding process can be formalized as follows:
Figure BDA0003312778600000041
Figure BDA0003312778600000042
wherein the content of the first and second substances,
Figure BDA0003312778600000043
and
Figure BDA0003312778600000044
respectively low-dimensional embedding obtained after passing through a first layer graph attention network and a second layer graph attention network in the attribute decoderVector quantity; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2);
Figure BDA0003312778600000045
attention coefficient called normalized;
Figure BDA0003312778600000046
and
Figure BDA0003312778600000047
respectively connecting weight matrixes in the attention network of the first layer graph and the attention network of the second layer graph;
the output of the last layer of the attribute decoder is used as a user node viReconstructed property of
Figure BDA0003312778600000048
Namely:
Figure BDA0003312778600000049
the loss function for attribute reconstruction is defined as equation (11):
Figure BDA00033127786000000410
s24, detecting the social network community structure by combining the modularity optimizer; classifying the low-dimensional embedded vectors Z of the nodes by using a softmax function to obtain a community distribution matrix P:
P=softmax(Z) (12)
in order to make the obtained interior of the community more compact, the community structure is optimized by combining the modularity; the modularity function is defined as the difference between the number of edges in the community and the number of edges expected on all user node pairs, expressed as:
Figure BDA00033127786000000411
wherein, ciRepresenting a user node viCommunity assigned if ci=cjThen, delta (c)i,cj) Is 1, otherwise is 0,
Figure BDA00033127786000000412
is a user node viAnd a user node vjDesired number of edges, k, betweeniIs a user node viThe degree of (a) is greater than (b),
Figure BDA00033127786000000413
is the total number of edges in the social network;
the matrix form of the modularity can be expressed as:
Figure BDA00033127786000000414
where P is the community allocation matrix, B is the modularity matrix, and B ═ Bij
Figure BDA0003312778600000051
To optimize equation (14), the modularity penalty is defined:
Figure BDA0003312778600000052
wherein Tr () is the trace of the matrix, Tr (P)TP)=N。
Preferably, the step S30 specifically includes the following steps:
s31, jointly training the four parts of the encoder, the structure decoder, the attribute decoder and the modularity optimizer, and defining a joint optimization objective function as shown in formula (16):
L=La+Lx-βLmod (16)
wherein L isaIs the loss of structural reconstruction, LxIs the attribute reconstruction loss, LmodIs the loss of modularity, beta is a hyper-parameter, which is used to measure the importance of the loss of modularity;
and S32, performing back propagation by using a gradient method, and updating the connection weight matrix in the film social network community structure detection model.
Preferably, the step S40 specifically includes the following steps:
s41, dividing users with similar interests in the movie social network into the same community; user node viThe community tag t of (a) is obtained by the formula (17):
Figure BDA0003312778600000053
wherein p isiuIs an element in the community distribution matrix P and represents a user node viProbability of belonging to community u;
and S42, sending the detection result of the community structure of the social network of the movie to related analysis personnel or scientific research personnel for carrying out related tasks including user interest analysis, interest community analysis, user film watching behavior prediction and diversified film recommendation.
On one hand, the community structure detection system of the movie social network comprises a movie social network structure construction and adjacency matrix and attribute matrix construction unit, a movie social network community structure detection model training unit and a movie social network community structure detection result output unit, wherein the movie social network structure construction and adjacency matrix and attribute matrix construction unit is connected with a computer processor and a memory;
the movie social network structure construction and adjacency matrix and attribute matrix construction unit is configured to execute step S10: acquiring a user data set, constructing a movie social network structure according to the attention relationship among users, taking the film watching data of the users as user node attributes, establishing an adjacency matrix and an attribute matrix based on the movie social network structure and the user node attributes, and loading the adjacency matrix and the attribute matrix into a computer memory; the viewing data includes: movie name, movie genre, starring actors, region;
the movie social network community structure detection model training unit is configured to perform steps S20 and S30: based on the established adjacency matrix and attribute matrix, a film social network community structure detection model is established by using an automatic graph encoder; designing a joint optimization objective function for the constructed film social network community structure detection model, and performing model training by minimizing the joint optimization objective function;
the movie social network community structure detection result output unit is configured to execute step S40: and detecting the community structure of the movie social network by using the trained detection model of the community structure of the movie social network, and outputting the detection result of the community structure of the movie social network.
Preferably, the movie social network structure construction and adjacency matrix and attribute matrix construction unit is specifically configured to perform the following steps:
s11, acquiring a user data set from the movie social platform, constructing a movie social network structure according to the concern relationship among users, representing social network users as user nodes in the network, representing the concern relationship among the users as edges among the user nodes, and taking the film watching data of the users as the attributes of the user nodes; let network be G ═ V, { E, X, and1,v2,…,vNdenotes the set of N user nodes in the network, where the nth user is denoted as user node vn,1≤n≤N;E={e1,e2,…,eMDenotes the M edges existing between user nodes, where the M-th edge is denoted as emM is more than or equal to 1 and less than or equal to M; x is a user node attribute matrix of dimension NxD, the nth row X of whichn=[xn1,xn2,…,xnD]Representing user nodes v in a networknOf D attributes, where element xndRepresenting a user node vnD is more than or equal to 1 and less than or equal to D;
s12, constructing an N × N-dimensional adjacency matrix with network G ═ V, E, X, and marking the adjacency matrix as a, where the value of each element in a represents the adjacency relationship between two corresponding user nodes in network G ═ V, E, X, that is, element a in the ith row and jth column in aijRepresenting the ith user node in the networkviAnd the jth user node vj1 ≦ i ≦ N,1 ≦ j ≦ N, if viAnd vjThere is an edge in between, then Aij1, otherwise Aij=0。
Preferably, the constructed movie social network community structure detection model comprises four parts, namely an encoder, a structure decoder, an attribute decoder and a modularity optimizer, and the movie social network community structure detection model training unit is specifically configured to execute the following steps:
s21, the encoder encodes the movie social network G ═ V, E, X as an embedded vector in a low dimensional space, and uses a graph attention network with the same 2-layer structure as an encoder
Figure BDA0003312778600000061
As input, the formalization of the encoding process is shown as follows:
Figure BDA0003312778600000062
Figure BDA0003312778600000063
Figure BDA0003312778600000071
wherein the content of the first and second substances,
Figure BDA0003312778600000072
and
Figure BDA0003312778600000073
are respectively user nodes viThe low-dimensional embedded vector is obtained after passing through the attention network of the first layer diagram and the attention network of the second layer diagram; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2); alpha is alphaijAn attention coefficient, called normalized, defined by equation (4); w(0)And W(1)Respectively determining connection weight matrixes in the attention network of the first layer of graph and the attention network of the second layer of graph, wherein the connection weight matrixes are undetermined parameters and are determined by inputting a movie social network in the subsequent steps; z is a set of encoded embedded vectors, ZtRepresenting by user node vtEncoding the resulting embedded vector in a low-dimensional space, an
Figure BDA0003312778600000074
Figure BDA0003312778600000075
In the formula, LeakyReLU () is a nonlinear activation function, and is defined by formula (5); a is a weight vector; w is a weight matrix; x is the number ofiRepresenting a user node vi(ii) an attribute of (d); | | is a join operation;
Figure BDA0003312778600000076
in the formula, lambda is a negative input slope and is 0.2;
s22, the structure decoder reconstructs the embedded vector set Z into a network relation
Figure BDA0003312778600000077
Namely, it is
Figure BDA0003312778600000078
The structural decoder definition is shown in equation (6):
Figure BDA0003312778600000079
wherein δ () is a dirac function;
using the cross-entropy function as a loss function for the structure reconstruction, defined by equation (7):
Figure BDA00033127786000000710
s23, the attribute decoder uses a symmetrical 2-layer graph attention network in the encoder to reconstruct the attribute information of the user nodes, each layer uses the representation of the neighbor user nodes to reconstruct the attribute of the nodes, and the decoding process can be formalized as follows:
Figure BDA00033127786000000711
Figure BDA00033127786000000712
wherein the content of the first and second substances,
Figure BDA00033127786000000713
and
Figure BDA00033127786000000714
respectively obtaining low-dimensional embedded vectors after passing through a first layer graph attention network and a second layer graph attention network in the attribute decoder; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2);
Figure BDA0003312778600000081
attention coefficient called normalized;
Figure BDA0003312778600000082
and
Figure BDA0003312778600000083
respectively connecting weight matrixes in the attention network of the first layer graph and the attention network of the second layer graph;
the output of the last layer of the attribute decoder is used as a user node viReconstructed property of
Figure BDA0003312778600000084
Namely:
Figure BDA0003312778600000085
the loss function for attribute reconstruction is defined as equation (11):
Figure BDA0003312778600000086
s24, detecting the social network community structure by combining the modularity optimizer; classifying the low-dimensional embedded vectors Z of the nodes by using a softmax function to obtain a community distribution matrix P:
P=softmax(Z)(12)
in order to make the obtained interior of the community more compact, the community structure is optimized by combining the modularity; the modularity function is defined as the difference between the number of edges in the community and the number of edges expected on all user node pairs, expressed as:
Figure BDA0003312778600000087
wherein, ciRepresenting a user node viCommunity assigned if ci=cjThen, delta (c)i,cj) Is 1, otherwise is 0,
Figure BDA0003312778600000088
is a user node viAnd a user node vjDesired number of edges, k, betweeniIs a user node viThe degree of (a) is greater than (b),
Figure BDA0003312778600000089
is the total number of edges in the social network;
the matrix form of the modularity can be expressed as:
Figure BDA00033127786000000810
where P is the community allocation matrix, B is the modularity matrix, and B ═ Bij
Figure BDA00033127786000000811
To optimize equation (14), the modularity penalty is defined:
Figure BDA00033127786000000812
wherein Tr () is the trace of the matrix, Tr (P)TP)=N。
Preferably, the movie social network community structure detection model training unit is further configured to perform the following steps:
s31, jointly training the four parts of the encoder, the structure decoder, the attribute decoder and the modularity optimizer, and defining a joint optimization objective function as shown in formula (16):
L=La+Lx-βLmod (16)
wherein L isaIs the loss of structural reconstruction, LxIs the attribute reconstruction loss, LmodIs the loss of modularity, beta is a hyper-parameter, which is used to measure the importance of the loss of modularity;
and S32, performing back propagation by using a gradient method, and updating the connection weight matrix in the film social network community structure detection model.
Preferably, the movie social network community structure detection result output unit is specifically configured to execute the following steps:
s41, dividing users with similar interests in the movie social network into the same community; user node viThe community tag t of (a) is obtained by the formula (17):
Figure BDA0003312778600000091
wherein p isiuIs a company of JapanElements in the region allocation matrix P representing user nodes viProbability of belonging to community u;
and S42, sending the detection result of the community structure of the social network of the movie to related analysis personnel or scientific research personnel for carrying out related tasks including user interest analysis, interest community analysis, user film watching behavior prediction and diversified film recommendation.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
(1) according to the community structure detection method and system for the movie social network, provided by the invention, the adjacency matrix and the attribute matrix of the movie social network are constructed, so that not only can the correlation information between users be recorded, but also the attribute information of the users is effectively utilized, and the detection result of the community structure of the movie social network with higher robustness and interpretability can be obtained.
(2) According to the community structure detection method and system for the movie social network, provided by the invention, the detection model of the community structure of the movie social network is established by utilizing the automatic encoder structure of the graph, so that the model has certain generating capacity, and the detection process of the community structure of the movie social network has stronger generalization capacity.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a flowchart of a community structure detection method for a social network of movies according to an embodiment of the present invention;
FIG. 2 is a block diagram of a movie social network community structure detection model provided by an embodiment of the present invention;
fig. 3 is a structural diagram of a community structure detection system of a movie social network according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
The embodiment of the invention firstly provides a community structure detection method of a movie social network, as shown in fig. 1, the method comprises the following steps:
s10, acquiring a user data set, constructing a movie social network structure according to the concern relationship among users, taking the film watching data (including movie names, movie types, main actors, regions and the like) of the users as user node attributes, and establishing an adjacency matrix and an attribute matrix based on the movie social network structure and the user node attributes.
The method specifically comprises the following steps:
s11, acquiring a user data set from the movie social platform, constructing a movie social network structure according to the concern relationship among users, representing social network users as user nodes in the network, representing the concern relationship among the users as edges among the user nodes, and taking the film watching data of the users as the attributes of the user nodes; let network be G ═ V, { E, X, and1,v2,…,vNdenotes the set of N user nodes in the network, where the nth user is denoted as user node vn,1≤n≤N;E={e1,e2,…,eMDenotes the M edges existing between user nodes, where the M-th edge is denoted as emM is more than or equal to 1 and less than or equal to M; x is a user node attribute matrix of dimension NxD, the nth row X of whichn=[xn1,xn2,…,xnD]Representing user nodes v in a networknOf D attributes, where element xndRepresenting a user node vnD is more than or equal to 1 and less than or equal to D;
s12, constructing an N × N-dimensional adjacency matrix with network G ═ V, E, X, and marking the adjacency matrix as a, where the value of each element in a represents the adjacency relationship between two corresponding user nodes in network G ═ V, E, X, that is, element a in the ith row and jth column in aijRepresenting the ith user node v in the networkiAnd the jth user node vj1 ≦ i ≦ N,1 ≦ j ≦ N, if viAnd vjThere is an edge in between, then Aij1, otherwise Aij=0。
And S20, constructing a film social network community structure detection model by using the automatic graph encoder based on the established adjacency matrix and attribute matrix.
The movie social network community structure detection model constructed in the step comprises four parts, namely an encoder, a structure decoder, an attribute decoder and a modularity optimizer, and specifically comprises the following steps as shown in fig. 2:
s21, the encoder encodes the movie social network G ═ V, E, X as an embedded vector in a low dimensional space, and uses a graph attention network with the same 2-layer structure as an encoder
Figure BDA0003312778600000111
As input, the formalization of the encoding process is shown as follows:
Figure BDA0003312778600000112
Figure BDA0003312778600000113
Figure BDA0003312778600000114
wherein the content of the first and second substances,
Figure BDA0003312778600000115
and
Figure BDA0003312778600000116
are respectively user nodes viThe low-dimensional embedded vector is obtained after passing through the attention network of the first layer diagram and the attention network of the second layer diagram; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2); alpha is alphaijAn attention coefficient, called normalized, defined by equation (4); w(0)And W(1)Respectively determining connection weight matrixes in the attention network of the first layer of graph and the attention network of the second layer of graph, wherein the connection weight matrixes are undetermined parameters and are determined by inputting a movie social network in the subsequent steps; z is a set of encoded embedded vectors, ZtRepresenting by user node vtEncoding the resulting embedded vector in a low-dimensional space, an
Figure BDA0003312778600000117
Figure BDA0003312778600000118
In the formula, LeakyReLU () is a nonlinear activation function, and is defined by formula (5); a is a weight vector; w is a weight matrix; x is the number ofiRepresenting a user node vi(ii) an attribute of (d); | | is a join operation;
Figure BDA0003312778600000119
in the formula, lambda is a negative input slope and is 0.2;
s22, the structure decoder reconstructs the embedded vector set Z into a network relation
Figure BDA00033127786000001110
Namely, it is
Figure BDA00033127786000001111
The structural decoder definition is shown in equation (6):
Figure BDA00033127786000001112
wherein δ () is a dirac function;
using the cross-entropy function as a loss function for the structure reconstruction, defined by equation (7):
Figure BDA00033127786000001113
s23, the attribute decoder uses a symmetrical 2-layer graph attention network in the encoder to reconstruct the attribute information of the user nodes, each layer uses the representation of the neighbor user nodes to reconstruct the attribute of the nodes, and the decoding process can be formalized as follows:
Figure BDA0003312778600000121
Figure BDA0003312778600000122
wherein the content of the first and second substances,
Figure BDA0003312778600000123
and
Figure BDA0003312778600000124
respectively obtaining low-dimensional embedded vectors after passing through a first layer graph attention network and a second layer graph attention network in the attribute decoder; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2);
Figure BDA0003312778600000125
attention coefficient called normalized;
Figure BDA0003312778600000126
and
Figure BDA0003312778600000127
respectively connecting weight matrixes in the attention network of the first layer graph and the attention network of the second layer graph;
the output of the last layer of the attribute decoder is used as a user node viReconstructed property of
Figure BDA0003312778600000128
Namely:
Figure BDA0003312778600000129
the loss function for attribute reconstruction is defined as equation (11):
Figure BDA00033127786000001210
s24, detecting the social network community structure by combining the modularity optimizer; classifying the low-dimensional embedded vectors Z of the nodes by using a softmax function to obtain a community distribution matrix P:
P=softmax(Z) (12)
in order to make the obtained interior of the community more compact, the community structure is optimized by combining the modularity; the modularity function is defined as the difference between the number of edges in the community and the number of edges expected on all user node pairs, expressed as:
Figure BDA00033127786000001211
wherein, ciRepresenting a user node viCommunity assigned if ci=cjThen, delta (c)i,cj) Is 1, otherwise is 0,
Figure BDA00033127786000001212
is a user node viAnd a user node vjDesired number of edges, k, betweeniIs a user node viThe degree of (a) is greater than (b),
Figure BDA00033127786000001213
is the total number of edges in the social network;
the matrix form of the modularity can be expressed as:
Figure BDA00033127786000001214
where P is the community allocation matrix, B is the modularity matrix, and B ═ Bij
Figure BDA00033127786000001215
To optimize equation (14), the modularity penalty is defined:
Figure BDA0003312778600000131
wherein Tr () is the trace of the matrix, Tr (P)TP)=N。
S30, designing a joint optimization objective function for the constructed film social network community structure detection model, and performing model training by minimizing the joint optimization objective function.
The method specifically comprises the following steps:
s31, jointly training the four parts of the encoder, the structure decoder, the attribute decoder and the modularity optimizer, and defining a joint optimization objective function as shown in formula (16):
L=La+Lx-βLmod (16)
wherein L isaIs the loss of structural reconstruction, LxIs the attribute reconstruction loss, LmodIs the loss of modularity, beta is a hyper-parameter, which is used to measure the importance of the loss of modularity;
and S32, performing back propagation by using a gradient method, and updating the connection weight matrix in the film social network community structure detection model.
And S40, detecting the community structure of the movie social network by using the trained detection model of the community structure of the movie social network, and outputting the detection result of the community structure of the movie social network.
The method specifically comprises the following steps:
s41, dividing users with similar interests in the movie social network into the same communityPerforming the following steps; user node viThe community tag t of (a) is obtained by the formula (17):
Figure BDA0003312778600000132
wherein p isiuIs an element in the community distribution matrix P and represents a user node viProbability of belonging to community u;
and S42, sending the detection result of the community structure of the social network of the movie to related analysis personnel or scientific research personnel for carrying out related tasks including user interest analysis, interest community analysis, user film watching behavior prediction and diversified film recommendation.
In order to verify the effectiveness and the advancement of the method, the method is compared with several classical community detection methods, the comparison methods comprise an Infomap method based on information theory, a Label Propagation (LPA) method, a graph self-encoder (GAE) method and an unsupervised community discovery (JGE-CD) method based on GCN, the average accuracy and the normalized mutual information of 20 experiments are used as evaluation indexes, the matching results are compared and analyzed, and the comparison results are shown in Table 1:
TABLE 1 comparison of results
Figure BDA0003312778600000133
Figure BDA0003312778600000141
As can be seen from the results in the table, the method can obtain better accuracy and normalized mutual information when the community structure detection is carried out on the movie social network.
Correspondingly, an embodiment of the present invention further provides a community structure detection system for a movie social network, as shown in fig. 3, the system includes: the system comprises a movie social network structure construction and adjacency matrix and attribute matrix construction unit, a movie social network community structure detection model training unit and a movie social network community structure detection result output unit, wherein the movie social network structure construction and adjacency matrix and attribute matrix construction unit is connected with a computer processor and a memory;
the movie social network structure construction and adjacency matrix and attribute matrix construction unit is configured to execute step S10: acquiring a user data set, constructing a movie social network structure according to the attention relationship among users, taking the film watching data of the users as user node attributes, establishing an adjacency matrix and an attribute matrix based on the movie social network structure and the user node attributes, and loading the adjacency matrix and the attribute matrix into a computer memory; the viewing data includes: movie name, movie genre, starring actors, region;
the movie social network community structure detection model training unit is configured to perform steps S20 and S30: based on the established adjacency matrix and attribute matrix, a film social network community structure detection model is established by using an automatic graph encoder; designing a joint optimization objective function for the constructed film social network community structure detection model, and performing model training by minimizing the joint optimization objective function;
the movie social network community structure detection result output unit is configured to execute step S40: and detecting the community structure of the movie social network by using the trained detection model of the community structure of the movie social network, and outputting the detection result of the community structure of the movie social network.
Further, the movie social network structure construction and adjacency matrix and attribute matrix construction unit is specifically configured to perform the following steps:
s11, acquiring a user data set from the movie social platform, constructing a movie social network structure according to the concern relationship among users, representing social network users as user nodes in the network, representing the concern relationship among the users as edges among the user nodes, and taking the film watching data of the users as the attributes of the user nodes; let network be G ═ V, { E, X, and1,v2,…,vNdenotes the set of N user nodes in the network, where the nth user is denoted as user node vn,1≤n≤N;E={e1,e2,…,eMDenotes the M edges existing between user nodes, where the M-th edge is denoted as emM is more than or equal to 1 and less than or equal to M; x is a user node attribute matrix of dimension NxD, the nth row X of whichn=[xn1,xn2,…,xnD]Representing user nodes v in a networknOf D attributes, where element xndRepresenting a user node vnD is more than or equal to 1 and less than or equal to D;
s12, constructing an N × N-dimensional adjacency matrix with network G ═ V, E, X, and marking the adjacency matrix as a, where the value of each element in a represents the adjacency relationship between two corresponding user nodes in network G ═ V, E, X, that is, element a in the ith row and jth column in aijRepresenting the ith user node v in the networkiAnd the jth user node vj1 ≦ i ≦ N,1 ≦ j ≦ N, if viAnd vjThere is an edge in between, then Aij1, otherwise Aij=0。
Further, the constructed movie social network community structure detection model comprises four parts, namely an encoder, a structure decoder, an attribute decoder and a modularity optimizer, and the movie social network community structure detection model training unit is specifically used for executing the following steps:
s21, the encoder encodes the film social network G ═ V, E, X into an embedded vector in a low-dimensional space, uses a graph attention network with the same 2-layer structure as an encoder, and uses Xi=hi (0)As input, the formalization of the encoding process is shown as follows:
Figure BDA0003312778600000151
Figure BDA0003312778600000152
Figure BDA0003312778600000153
wherein the content of the first and second substances,
Figure BDA0003312778600000154
and
Figure BDA0003312778600000155
are respectively user nodes viThe low-dimensional embedded vector is obtained after passing through the attention network of the first layer diagram and the attention network of the second layer diagram; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2); alpha is alphaijAn attention coefficient, called normalized, defined by equation (4); w(0)And W(1)Respectively determining connection weight matrixes in the attention network of the first layer of graph and the attention network of the second layer of graph, wherein the connection weight matrixes are undetermined parameters and are determined by inputting a movie social network in the subsequent steps; z is a set of encoded embedded vectors, ZtRepresenting by user node vtEncoding the resulting embedded vector in a low-dimensional space, an
Figure BDA0003312778600000156
Figure BDA0003312778600000157
In the formula, LeakyReLU () is a nonlinear activation function, and is defined by formula (5); a is a weight vector; w is a weight matrix; x is the number ofiRepresenting a user node vi(ii) an attribute of (d); | | is a join operation;
Figure BDA0003312778600000158
in the formula, lambda is a negative input slope and is 0.2;
s22, the structure decoder reconstructs the embedded vector set Z into a network relation
Figure BDA0003312778600000161
Namely, it is
Figure BDA0003312778600000162
The structural decoder definition is shown in equation (6):
Figure BDA0003312778600000163
wherein δ () is a dirac function;
using the cross-entropy function as a loss function for the structure reconstruction, defined by equation (7):
Figure BDA0003312778600000164
s23, the attribute decoder uses a symmetrical 2-layer graph attention network in the encoder to reconstruct the attribute information of the user nodes, each layer uses the representation of the neighbor user nodes to reconstruct the attribute of the nodes, and the decoding process can be formalized as follows:
Figure BDA0003312778600000165
Figure BDA0003312778600000166
wherein the content of the first and second substances,
Figure BDA0003312778600000167
and
Figure BDA0003312778600000168
respectively obtaining low-dimensional embedded vectors after passing through a first layer graph attention network and a second layer graph attention network in the attribute decoder; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2);
Figure BDA0003312778600000169
attention coefficient called normalized;
Figure BDA00033127786000001610
and
Figure BDA00033127786000001611
respectively connecting weight matrixes in the attention network of the first layer graph and the attention network of the second layer graph;
the output of the last layer of the attribute decoder is used as a user node viReconstructed property of
Figure BDA00033127786000001612
Namely:
Figure BDA00033127786000001613
the loss function for attribute reconstruction is defined as equation (11):
Figure BDA00033127786000001614
s24, detecting the social network community structure by combining the modularity optimizer; classifying the low-dimensional embedded vectors Z of the nodes by using a softmax function to obtain a community distribution matrix P:
P=softmax(Z) (12)
in order to make the obtained interior of the community more compact, the community structure is optimized by combining the modularity; the modularity function is defined as the difference between the number of edges in the community and the number of edges expected on all user node pairs, expressed as:
Figure BDA00033127786000001615
wherein, ciRepresenting a user node viCommunity assigned if ci=cjThen, delta (c)i,cj) Is 1, otherwise is 0,
Figure BDA0003312778600000171
is a user node viAnd a user node vjDesired number of edges, k, betweeniIs a user node viThe degree of (a) is greater than (b),
Figure BDA0003312778600000172
is the total number of edges in the social network;
the matrix form of the modularity can be expressed as:
Figure BDA0003312778600000173
where P is the community allocation matrix, B is the modularity matrix, and B ═ Bij
Figure BDA0003312778600000174
To optimize equation (14), the modularity penalty is defined:
Figure BDA0003312778600000175
wherein Tr () is the trace of the matrix, Tr (P)TP)=N。
Further, the movie social network community structure detection model training unit is further configured to perform the following steps:
s31, jointly training the four parts of the encoder, the structure decoder, the attribute decoder and the modularity optimizer, and defining a joint optimization objective function as shown in formula (16):
L=La+Lx-βLmod (16)
wherein L isaIs the loss of structural reconstruction, LxIs the attribute reconstruction loss, LmodIs the loss of modularity, beta is a hyper-parameter, which is used to measure the importance of the loss of modularity;
and S32, performing back propagation by using a gradient method, and updating the connection weight matrix in the film social network community structure detection model.
Further, the movie social network community structure detection result output unit is specifically configured to execute the following steps:
s41, dividing users with similar interests in the movie social network into the same community; user node viThe community tag t of (a) is obtained by the formula (17):
Figure BDA0003312778600000176
wherein p isiuIs an element in the community distribution matrix P and represents a user node viProbability of belonging to community u;
and S42, sending the detection result of the community structure of the social network of the movie to related analysis personnel or scientific research personnel for carrying out related tasks including user interest analysis, interest community analysis, user film watching behavior prediction and diversified film recommendation.
Compared with the prior art, the method and the system for detecting the community structure of the movie social network, provided by the invention, construct the adjacency matrix and the attribute matrix of the movie social network, can record the association information among users, effectively utilize the attribute information of the users, and are beneficial to obtaining a detection result of the community structure of the movie social network with stronger robustness and interpretability. In addition, the invention utilizes the automatic encoder structure of the image to establish the detection model of the community structure of the movie social network, so that the model has certain generating capacity, and the detection process of the community structure of the movie social network has stronger generalization capacity.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A community structure detection method of a movie social network is characterized by comprising the following steps:
s10, acquiring a user data set, constructing a movie social network structure according to the concern relationship among users, taking the film watching data of the users as user node attributes, and establishing an adjacency matrix and an attribute matrix based on the movie social network structure and the user node attributes; the viewing data includes: movie name, movie genre, starring actors, region;
s20, constructing a film social network community structure detection model by using an automatic graph encoder based on the established adjacency matrix and attribute matrix;
s30, designing a joint optimization objective function for the constructed film social network community structure detection model, and performing model training by minimizing the joint optimization objective function;
and S40, detecting the community structure of the movie social network by using the trained detection model of the community structure of the movie social network, and outputting the detection result of the community structure of the movie social network.
2. The method for detecting community structure of social networking services of claim 1, wherein the step S10 specifically comprises the following steps:
s11, acquiring a user data set from the movie social platform, constructing a movie social network structure according to the concern relationship among users, representing social network users as user nodes in the network, representing the concern relationship among the users as edges among the user nodes, and taking the film watching data of the users as the attributes of the user nodes; let network be G ═ V, { E, X, and1,v2,…,vNdenotes the set of N user nodes in the network, where the nth user is denoted as user node vn,1≤n≤N;E={e1,e2,…,eMDenotes the M edges existing between user nodes, where the M-th edge is denoted as emM is more than or equal to 1 and less than or equal to M; x is a user node attribute matrix of dimension NxD, the nth row X of whichn=[xn1,xn2,…,xnD]Representing user nodes v in a networknOf D attributes, where element xndRepresenting a user node vnD is more than or equal to 1 and less than or equal to D;
s12, constructing an N × N-dimensional adjacency matrix with network G ═ V, E, X, and marking the adjacency matrix as a, where the value of each element in a represents the adjacency relationship between two corresponding user nodes in network G ═ V, E, X, that is, element a in the ith row and jth column in aijRepresenting the ith user node v in the networkiAnd the jth user node vj1 ≦ i ≦ N,1 ≦ j ≦ N, if viAnd vjThere is an edge in between, then Aij1, otherwise Aij=0。
3. The community structure detection method for social networks of movies as claimed in claim 2, wherein the community structure detection model for social networks of movies constructed in the step S20 comprises four parts, namely an encoder, a structure decoder, an attribute decoder, and a modularity optimizer; the step S20 specifically includes the following steps:
s21, the encoder encodes the movie social network G ═ V, E, X as an embedded vector in a low dimensional space, and uses a graph attention network with the same 2-layer structure as an encoder
Figure FDA00033127785900000213
As input, the formalization of the encoding process is shown as follows:
Figure FDA0003312778590000021
Figure FDA0003312778590000022
Figure FDA0003312778590000023
wherein the content of the first and second substances,
Figure FDA0003312778590000024
and
Figure FDA0003312778590000025
are respectively user nodes viThe low-dimensional embedded vector is obtained after passing through the attention network of the first layer diagram and the attention network of the second layer diagram; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2); alpha is alphaijAn attention coefficient, called normalized, defined by equation (4); w(0)And W(1)Respectively determining connection weight matrixes in the attention network of the first layer of graph and the attention network of the second layer of graph, wherein the connection weight matrixes are undetermined parameters and are determined by inputting a movie social network in the subsequent steps; z is a set of encoded embedded vectors, ZtRepresenting by user node vtEncoding the resulting embedded vector in a low-dimensional space, an
Figure FDA0003312778590000026
Figure FDA0003312778590000027
In the formula, LeakyReLU () is a nonlinear activation function, and is defined by formula (5); a is a weight vector; w is a weight matrix; x is the number ofiRepresenting a user node vi(ii) an attribute of (d); | | is a join operation;
Figure FDA0003312778590000028
in the formula, lambda is a negative input slope and is 0.2;
s22, the structure decoder reconstructs the embedded vector set Z into a network relation
Figure FDA00033127785900000211
Namely, it is
Figure FDA00033127785900000212
The structural decoder definition is shown in equation (6):
Figure FDA0003312778590000029
wherein δ () is a dirac function;
using the cross-entropy function as a loss function for the structure reconstruction, defined by equation (7):
Figure FDA00033127785900000210
s23, the attribute decoder uses a symmetrical 2-layer graph attention network in the encoder to reconstruct the attribute information of the user nodes, each layer uses the representation of the neighbor user nodes to reconstruct the attribute of the nodes, and the decoding process can be formalized as follows:
Figure FDA0003312778590000031
Figure FDA0003312778590000032
wherein the content of the first and second substances,
Figure FDA0003312778590000033
and
Figure FDA0003312778590000034
respectively obtaining low-dimensional embedded vectors after passing through a first layer graph attention network and a second layer graph attention network in the attribute decoder; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2);
Figure FDA0003312778590000035
attention coefficient called normalized;
Figure FDA0003312778590000036
and
Figure FDA0003312778590000037
respectively connecting weight matrixes in the attention network of the first layer graph and the attention network of the second layer graph;
the output of the last layer of the attribute decoder is used as a user node viReconstructed property of
Figure FDA0003312778590000038
Namely:
Figure FDA0003312778590000039
the loss function for attribute reconstruction is defined as equation (11):
Figure FDA00033127785900000310
s24, detecting the social network community structure by combining the modularity optimizer; classifying the low-dimensional embedded vectors Z of the nodes by using a softmax function to obtain a community distribution matrix P:
P=softmax(Z) (12)
in order to make the obtained interior of the community more compact, the community structure is optimized by combining the modularity; the modularity function is defined as the difference between the number of edges in the community and the number of edges expected on all user node pairs, expressed as:
Figure FDA00033127785900000311
wherein, ciRepresenting a user node viCommunity assigned if ci=cjThen, delta (c)i,cj) Is/are as followsThe value is 1, otherwise 0,
Figure FDA00033127785900000312
is a user node viAnd a user node vjDesired number of edges, k, betweeniIs a user node viThe degree of (a) is greater than (b),
Figure FDA00033127785900000313
is the total number of edges in the social network;
the matrix form of the modularity can be expressed as:
Figure FDA00033127785900000314
where P is the community allocation matrix, B is the modularity matrix, and B ═ Bij
Figure FDA00033127785900000315
To optimize equation (14), the modularity penalty is defined:
Figure FDA0003312778590000041
wherein Tr () is the trace of the matrix, Tr (P)TP)=N。
4. The method for detecting community structure of social networking services of claim 3, wherein the step S30 specifically comprises the following steps:
s31, jointly training the four parts of the encoder, the structure decoder, the attribute decoder and the modularity optimizer, and defining a joint optimization objective function as shown in formula (16):
L=La+Lx-βLmod (16)
wherein L isaIs the loss of structural reconstruction, LxIs attribute reconstruction loss,LmodIs the loss of modularity, beta is a hyper-parameter, which is used to measure the importance of the loss of modularity;
and S32, performing back propagation by using a gradient method, and updating the connection weight matrix in the film social network community structure detection model.
5. The method for detecting community structure of social networking services of claim 1, wherein the step S40 specifically comprises the following steps:
s41, dividing users with similar interests in the movie social network into the same community; user node viThe community tag t of (a) is obtained by the formula (17):
Figure FDA0003312778590000042
wherein p isiuIs an element in the community distribution matrix P and represents a user node viProbability of belonging to community u;
and S42, sending the detection result of the community structure of the social network of the movie to related analysis personnel or scientific research personnel for carrying out related tasks including user interest analysis, interest community analysis, user film watching behavior prediction and diversified film recommendation.
6. A community structure detection system of a movie social network is characterized by comprising a movie social network structure construction and adjacency matrix and attribute matrix construction unit, a movie social network community structure detection model training unit and a movie social network community structure detection result output unit, wherein the movie social network structure construction and adjacency matrix and attribute matrix construction unit is connected with a computer processor and a memory;
the movie social network structure construction and adjacency matrix and attribute matrix construction unit is configured to execute step S10: acquiring a user data set, constructing a movie social network structure according to the attention relationship among users, taking the film watching data of the users as user node attributes, establishing an adjacency matrix and an attribute matrix based on the movie social network structure and the user node attributes, and loading the adjacency matrix and the attribute matrix into a computer memory; the viewing data includes: movie name, movie genre, starring actors, region;
the movie social network community structure detection model training unit is configured to perform steps S20 and S30: based on the established adjacency matrix and attribute matrix, a film social network community structure detection model is established by using an automatic graph encoder; designing a joint optimization objective function for the constructed film social network community structure detection model, and performing model training by minimizing the joint optimization objective function;
the movie social network community structure detection result output unit is configured to execute step S40: and detecting the community structure of the movie social network by using the trained detection model of the community structure of the movie social network, and outputting the detection result of the community structure of the movie social network.
7. The community structure detection system of a social network of movies as claimed in claim 6, wherein the movie social network structure construction and adjacency matrix and attribute matrix construction unit is specifically configured to perform the following steps:
s11, acquiring a user data set from the movie social platform, constructing a movie social network structure according to the concern relationship among users, representing social network users as user nodes in the network, representing the concern relationship among the users as edges among the user nodes, and taking the film watching data of the users as the attributes of the user nodes; let network be G ═ V, { E, X, and1,v2,…,vNdenotes the set of N user nodes in the network, where the nth user is denoted as user node vn,1≤n≤N;E={e1,e2,…,eMDenotes the M edges existing between user nodes, where the M-th edge is denoted as emM is more than or equal to 1 and less than or equal to M; x is a user node attribute matrix of dimension NxD, the nth row X of whichn=[xn1,xn2,…,xnD]Representing user nodes v in a networknOf D attributes, where element xndRepresenting a user node vnD is more than or equal to 1 and less than or equal to D;
s12, constructing an N × N-dimensional adjacency matrix with network G ═ V, E, X, and marking the adjacency matrix as a, where the value of each element in a represents the adjacency relationship between two corresponding user nodes in network G ═ V, E, X, that is, element a in the ith row and jth column in aijRepresenting the ith user node v in the networkiAnd the jth user node vj1 ≦ i ≦ N,1 ≦ j ≦ N, if viAnd vjThere is an edge in between, then Aij1, otherwise Aij=0。
8. The community structure detection system of the movie social network, according to claim 7, wherein the constructed movie social network community structure detection model comprises four parts, namely an encoder, a structure decoder, an attribute decoder, and a modularity optimizer, and the movie social network community structure detection model training unit is specifically configured to perform the following steps:
s21, the encoder encodes the movie social network G ═ V, E, X as an embedded vector in a low dimensional space, and uses a graph attention network with the same 2-layer structure as an encoder
Figure FDA0003312778590000051
As input, the formalization of the encoding process is shown as follows:
Figure FDA0003312778590000052
Figure FDA0003312778590000061
Figure FDA0003312778590000062
wherein the content of the first and second substances,
Figure FDA0003312778590000063
and
Figure FDA0003312778590000064
are respectively user nodes viThe low-dimensional embedded vector is obtained after passing through the attention network of the first layer diagram and the attention network of the second layer diagram; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2); alpha is alphaijAn attention coefficient, called normalized, defined by equation (4); w(0)And W(1)Respectively determining connection weight matrixes in the attention network of the first layer of graph and the attention network of the second layer of graph, wherein the connection weight matrixes are undetermined parameters and are determined by inputting a movie social network in the subsequent steps; z is a set of encoded embedded vectors, ZtRepresenting by user node vtEncoding the resulting embedded vector in a low-dimensional space, an
Figure FDA0003312778590000065
Figure FDA0003312778590000066
In the formula, LeakyReLU () is a nonlinear activation function, and is defined by formula (5); a is a weight vector; w is a weight matrix; x is the number ofiRepresenting a user node vi(ii) an attribute of (d); | | is a join operation;
Figure FDA0003312778590000067
in the formula, lambda is a negative input slope and is 0.2;
s22, the structure decoder reconstructs the embedded vector set Z into a network relation
Figure FDA0003312778590000068
Namely, it is
Figure FDA0003312778590000069
The structural decoder definition is shown in equation (6):
Figure FDA00033127785900000610
wherein δ () is a dirac function;
using the cross-entropy function as a loss function for the structure reconstruction, defined by equation (7):
Figure FDA00033127785900000611
s23, the attribute decoder uses a symmetrical 2-layer graph attention network in the encoder to reconstruct the attribute information of the user nodes, each layer uses the representation of the neighbor user nodes to reconstruct the attribute of the nodes, and the decoding process can be formalized as follows:
Figure FDA00033127785900000612
Figure FDA00033127785900000613
wherein the content of the first and second substances,
Figure FDA00033127785900000614
and
Figure FDA00033127785900000615
respectively obtaining low-dimensional embedded vectors after passing through a first layer graph attention network and a second layer graph attention network in the attribute decoder; s is a non-linear activation function; n is a radical ofiRepresenting a user node viThe neighbor node of (2);
Figure FDA0003312778590000071
attention coefficient called normalized;
Figure FDA0003312778590000072
and
Figure FDA0003312778590000073
respectively connecting weight matrixes in the attention network of the first layer graph and the attention network of the second layer graph;
the output of the last layer of the attribute decoder is used as a user node viReconstructed property of
Figure FDA0003312778590000074
Namely:
Figure FDA0003312778590000075
the loss function for attribute reconstruction is defined as equation (11):
Figure FDA0003312778590000076
s24, detecting the social network community structure by combining the modularity optimizer; classifying the low-dimensional embedded vectors Z of the nodes by using a softmax function to obtain a community distribution matrix P:
P=softmax(Z) (12)
in order to make the obtained interior of the community more compact, the community structure is optimized by combining the modularity; the modularity function is defined as the difference between the number of edges in the community and the number of edges expected on all user node pairs, expressed as:
Figure FDA0003312778590000077
wherein, ciRepresenting a user node viCommunity assigned if ci=cjThen, delta (c)i,cj) Is 1, otherwise is 0,
Figure FDA0003312778590000078
is a user node viAnd a user node vjDesired number of edges, k, betweeniIs a user node viThe degree of (a) is greater than (b),
Figure FDA0003312778590000079
is the total number of edges in the social network;
the matrix form of the modularity can be expressed as:
Figure FDA00033127785900000710
where P is the community allocation matrix, B is the modularity matrix, and B ═ Bij
Figure FDA00033127785900000711
To optimize equation (14), the modularity penalty is defined:
Figure FDA00033127785900000712
wherein Tr () is the trace of the matrix, Tr (P)TP)=N。
9. The community structure detection system for social networking movie according to claim 8, wherein the community structure detection model training unit for social networking movie is further configured to perform the following steps:
s31, jointly training the four parts of the encoder, the structure decoder, the attribute decoder and the modularity optimizer, and defining a joint optimization objective function as shown in formula (16):
L=La+Lx-βLmod (16)
wherein L isaIs the loss of structural reconstruction, LxIs the attribute reconstruction loss, LmodIs the loss of modularity, beta is a hyper-parameter, which is used to measure the importance of the loss of modularity;
and S32, performing back propagation by using a gradient method, and updating the connection weight matrix in the film social network community structure detection model.
10. The community structure detection system of a social network of movies according to claim 6, wherein the community structure detection result output unit of the social network of movies is specifically configured to execute the following steps:
s41, dividing users with similar interests in the movie social network into the same community; user node viThe community tag t of (a) is obtained by the formula (17):
Figure FDA0003312778590000081
wherein p isiuIs an element in the community distribution matrix P and represents a user node viProbability of belonging to community u;
and S42, sending the detection result of the community structure of the social network of the movie to related analysis personnel or scientific research personnel for carrying out related tasks including user interest analysis, interest community analysis, user film watching behavior prediction and diversified film recommendation.
CN202111221461.8A 2021-10-20 2021-10-20 Community structure detection method and system for movie social network Pending CN114020999A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111221461.8A CN114020999A (en) 2021-10-20 2021-10-20 Community structure detection method and system for movie social network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111221461.8A CN114020999A (en) 2021-10-20 2021-10-20 Community structure detection method and system for movie social network

Publications (1)

Publication Number Publication Date
CN114020999A true CN114020999A (en) 2022-02-08

Family

ID=80056817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111221461.8A Pending CN114020999A (en) 2021-10-20 2021-10-20 Community structure detection method and system for movie social network

Country Status (1)

Country Link
CN (1) CN114020999A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115964626A (en) * 2022-10-27 2023-04-14 河南大学 Community detection method based on dynamic multi-scale feature fusion network
CN116563049A (en) * 2023-04-24 2023-08-08 华南师范大学 Directed weighted symbol social network community discovery method
CN117113240A (en) * 2023-10-23 2023-11-24 华南理工大学 Dynamic network community discovery method, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115964626A (en) * 2022-10-27 2023-04-14 河南大学 Community detection method based on dynamic multi-scale feature fusion network
CN116563049A (en) * 2023-04-24 2023-08-08 华南师范大学 Directed weighted symbol social network community discovery method
CN117113240A (en) * 2023-10-23 2023-11-24 华南理工大学 Dynamic network community discovery method, device, equipment and storage medium
CN117113240B (en) * 2023-10-23 2024-03-26 华南理工大学 Dynamic network community discovery method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
CN114020999A (en) Community structure detection method and system for movie social network
CN114048350A (en) Text-video retrieval method based on fine-grained cross-modal alignment model
CN112507246B (en) Social recommendation method fusing global and local social interest influence
CN112417313A (en) Model hybrid recommendation method based on knowledge graph convolutional network
Huang et al. Neural embedding collaborative filtering for recommender systems
CN114065048A (en) Article recommendation method based on multi-different-pattern neural network
Hazrati et al. Addressing the New Item problem in video recommender systems by incorporation of visual features with restricted Boltzmann machines
CN115168744A (en) Radio and television technology knowledge recommendation method based on user portrait and knowledge graph
CN114357201B (en) Audio-visual recommendation method and system based on information perception
CN113590965B (en) Video recommendation method integrating knowledge graph and emotion analysis
Wang et al. Research on BP neural network recommendation model fusing user reviews and ratings
CN113918711B (en) Academic paper-oriented classification method based on multi-view multi-layer attention
Khan et al. Cross‐modal retrieval based on deep regularized hashing constraints
Ali et al. Dynamic context management in context-aware recommender systems
Nazari et al. Scalable and data-independent multi-agent recommender system using social networks analysis
CN111930926B (en) Personalized recommendation algorithm combined with comment text mining
CN113342994A (en) Recommendation system based on non-sampling cooperative knowledge graph network
Zheng et al. Incorporating price into recommendation with graph convolutional networks
CN112765490A (en) Information recommendation method and system based on knowledge graph and graph convolution network
Ntalianis et al. Social relevance feedback based on multimedia content power
CN115600017A (en) Feature coding model training method and device and media object recommendation method and device
CN116010696A (en) News recommendation method, system and medium integrating knowledge graph and long-term interest of user
CN117033754A (en) Model processing method, device, equipment and storage medium for pushing resources
Gan TAFFY: incorporating tag information into a diffusion process for personalized recommendations
CN111737591A (en) Product recommendation method based on heterogeneous heavy-side information network translation model

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