Private domain social relationship mining method and system based on graph neural network

By adopting a graph-based neural network method in private domain scenarios, combining knowledge graphs and timing-aware dynamic encoders, processing user historical behavior data and building a private domain user relationship diagram, the problems of insufficient user relationship analysis in the existing technology are solved, and more accurate and reliable social relationship analysis is achieved.

CN119415979BActive Publication Date: 2025-04-01BEIJING YIHUI ZMENG NETWORK TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510018321.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-07
Publication Date
2025-04-01
Estimated Expiration
2045-01-07

AI Technical Summary

Technical Problem

In the analysis of user relationships in the private domain scenarios, the extraction of user behavior characteristics is not comprehensive enough, and it is difficult to effectively integrate the user's historical behavior data and domain knowledge. Traditional centralized machine learning models have data security and computing efficiency problems when processing large-scale distributed user data, and insufficient consideration of the dynamic evolution characteristics and timing characteristics of user relationships, making it difficult to accurately characterize the influence transmission and relationship intensity changes between users.

Method used

Using a graph neural network-based method, user behavior feature data is generated by obtaining user's historical behavior data and using knowledge graph technology to perform entity alignment and relationship mapping. Then, the node feature matrix and dynamic edge feature matrix are constructed, the user interaction sequence is processed using the time-sequence-aware dynamic encoder, and the private domain user relationship diagram is constructed by fusing the feature matrix. The user data is scattered and stored in multiple local computing nodes, a federated graph neural network model is constructed, and the processing results are integrated using the secure aggregation protocol to calculate the social influence indicators and relationship strength indicators among users. The stability of the social circle structure is verified through spectral clustering and causal intervention analysis.

Benefits of technology

It realizes a more comprehensive and refined user relationship analysis, improves the accuracy and reliability of social relationship mining, ensures the protection of user data privacy, and provides a more stable social circle structure and interpretability analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415979B_ABST
    Figure CN119415979B_ABST
Patent Text Reader

Abstract

The present invention provides a private domain social relationship mining method and system based on graph neural network, which relates to the field of social relationship mining technology, including using knowledge graph technology to align the historical behavior data of private domain platform users with external knowledge bases for entity and relationship mapping, generate user behavior feature data, and construct a user relationship graph; use a federated graph neural network model containing a spatiotemporal attention layer to process user data to obtain user node representation vectors; calculate the social influence index and relationship strength index between users according to the user node representation vector, and use spectral clustering method and causal intervention analysis to determine the final social circle structure, and generate a social relationship analysis report. The present invention can effectively mine complex user social relationships in private domain platforms, improve the accuracy and stability of social circle identification, and provide technical support for precision marketing and personalized recommendations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of social relationship mining, and in particular to a private domain social relationship mining method and system based on graph neural network. Background Art

[0002] With the rapid development of private domain traffic operations, establishing user relationships and communities through social networks has become an important marketing strategy. Traditional social network analysis methods mainly mine relationships based on direct interaction data between users, but in private domain scenarios, the relationships between users are more complex and dynamic, including both explicit interaction behaviors and a large number of implicit interest preferences and behavioral characteristics. Therefore, it is necessary to establish a more refined user relationship analysis model to mine the deep social connections between users and provide decision support for private domain operations.

[0003] There are still several problems in the existing technology. The extraction of user behavior features is not comprehensive enough, and it is difficult to effectively integrate users' historical behavior data and domain knowledge. Traditional centralized machine learning models have data security and computing efficiency issues when processing large-scale distributed user data. The dynamic evolution characteristics and timing characteristics of user relationships are not sufficiently considered, making it difficult to accurately characterize the influence transfer and relationship strength changes between users. There is a lack of systematic verification of the stability of the social circle structure, which easily leads to unstable user groupings.

[0004] In summary, a user behavior modeling method that can fully utilize knowledge graphs and time series features is constructed, distributed collaborative learning is realized under the premise of protecting user data privacy, and the stability and interpretability of social circle division are ensured through causal intervention analysis, thereby providing more accurate and reliable social relationship analysis results for private domain platforms. The present invention can solve the problems in the prior art. Summary of the invention

[0005] The embodiments of the present invention provide a private domain social relationship mining method and system based on graph neural network, which can solve the problems in the prior art.

[0006] According to a first aspect of the embodiments of the present invention,

[0007] A private domain social relationship mining method based on graph neural network is provided, comprising:

[0008] Acquire historical behavior data of multiple users in the target private domain platform; use knowledge graph technology to align entities and map relationships between the historical behavior data and the external domain knowledge base to generate user behavior feature data; construct a node feature matrix based on the user behavior feature data; use a time-series-aware dynamic encoder to process user interaction sequences in the user behavior feature data to generate a dynamic edge feature matrix; fuse the node feature matrix and the dynamic edge feature matrix to construct a private domain user relationship graph;

[0009] The user data of the private domain user relationship graph is dispersedly stored in multiple local computing nodes, a federated graph neural network model including a spatiotemporal attention layer is respectively constructed on the multiple local computing nodes, and a secure aggregation protocol is adopted to integrate the processing results of the multiple local computing nodes to obtain a user node representation vector;

[0010] The social influence index and the relationship strength index between users are calculated according to the user node representation vector, and the social influence index and the relationship strength index are clustered and analyzed by the spectral clustering method to obtain the initial social circle structure; causal intervention analysis is performed to verify the stability of the initial social circle structure and determine the final social circle structure; and a social relationship analysis report is generated based on the final social circle structure, the social influence index and the relationship strength index.

[0011] In an optional embodiment,

[0012] The time-series-aware dynamic encoder is used to process the user interaction sequence in the user behavior feature data to generate a dynamic edge feature matrix including:

[0013] The historical behavior data includes user identification, interaction type, interaction timestamp and interaction object;

[0014] Constructing a user interaction sequence according to the interaction timestamps in the historical behavior data, wherein the user interaction sequence records the interaction records between the user and the interaction object in chronological order; dividing the user interaction sequence into a plurality of interaction subsequences according to a preset time window; calculating the occurrence frequency and transition probability of the interaction objects in the interaction subsequences to generate a sequence feature vector;

[0015] Using a bidirectional long short-term memory conditional random field model to identify entity mentions from the historical behavior data; combining the sequence feature vector with the semantic features of the entity mention to generate entity matching features; calculating the matching degree with the candidate entity in the external domain knowledge base based on the entity matching features; and selecting the candidate entity with the highest matching degree as the link entity;

[0016] Execute a label propagation algorithm on the linked entities to obtain entity community division results; determine a sampling probability distribution according to the structural closeness between entities in the entity community division results; obtain neighbor entities within a preset hop count range in the external domain knowledge base based on the sampling probability distribution to form a local knowledge subgraph, and decompose the relationship path between entities in the local knowledge subgraph into multiple time-dependent subpaths;

[0017] A timing-aware dynamic encoder including an interaction sequence encoding layer and a dynamic feature fusion layer is constructed, and the user interaction sequence and the timing-dependent subpath are input into the timing-aware dynamic encoder; the timing dependency of the interaction sequence is extracted in the interaction sequence encoding layer; the timing dependency, the node feature matrix and the timing-dependent subpath are integrated in the dynamic feature fusion layer; and a dynamic edge feature matrix is ​​generated.

[0018] In an optional embodiment,

[0019] Executing a label propagation algorithm on the link entity to obtain an entity community division result includes:

[0020] Counting the number of connections between each linked entity and other linked entities to obtain a node connection number statistical value, and calculating the node degree centrality of each linked entity according to the node connection number statistical value; sorting the linked entities in descending order based on the node degree centrality to generate a node influence sequence;

[0021] Based on the node influence sequence, determine the number, set the number as the initial label value of the link entity, and generate an initial label sequence; determine the adjacent entity set of each link entity according to the connection relationship between the link entities; combine the label values ​​of each entity in the adjacent entity set into a label update candidate set;

[0022] According to the order of the node influence sequence from large to small, a label update operation is performed on each of the link entities:

[0023] Count the number of occurrences of each label value in the label update candidate set corresponding to the current link entity to generate a label frequency sequence; select the label value with the largest number of occurrences from the label frequency sequence as the target label value; when there are multiple label values ​​with the largest number of occurrences in the label frequency sequence, select the label value with the smallest value as the target label value; update the target label value to the label value of the current link entity;

[0024] Divide the linked entities with the same label value into the same community to obtain the community division result of the current round;

[0025] Calculate the number of entities in the same community in the community division results of the current round and the community division results of the previous round to generate a community overlap; divide the community overlap by the total number of linked entities to obtain a community stability coefficient;

[0026] Repeat the iteration until the community stability coefficient is greater than a preset stability threshold, determine the community division result corresponding to the current round as the final result, and obtain the entity community division result.

[0027] In an optional embodiment,

[0028] The dynamic edge feature matrix also includes:

[0029] Separating the dynamic edge feature matrix into a structural feature sub-matrix, a semantic feature sub-matrix and a temporal feature sub-matrix;

[0030] Performing feature decomposition operations on the structural feature submatrix, the semantic feature submatrix, and the temporal feature submatrix, respectively, to obtain main feature components; calculating the probability distribution of non-zero elements in the main feature components, and calculating information entropy scores based on the probability distribution;

[0031] Constructing a multi-head attention network, the multi-head attention network comprises a query transformation layer, a key transformation layer and a value transformation layer; inputting the structural feature submatrix, the semantic feature submatrix and the temporal feature submatrix into the query transformation layer, the key transformation layer and the value transformation layer respectively to obtain a query matrix, a key matrix and a value matrix; performing a matrix multiplication operation on the query matrix and the key matrix to obtain an attention score matrix; performing a normalization process on the attention score matrix and performing a matrix multiplication operation with the value matrix to obtain a channel feature representation;

[0032] Constructing a feature fusion gating network, wherein the feature fusion gating network includes an update gate and a reset gate; inputting the channel feature representation into the feature fusion gating network, calculating the importance weight of each channel feature through the update gate, controlling the transmission of feature information through the reset gate, performing weighted combination of the channel feature representation based on the importance weight, and generating a fusion feature matrix;

[0033] Compare the information entropy score with a preset information entropy threshold, select a feature dimension corresponding to a value greater than the information entropy threshold, perform a dimensionality reduction operation on the fused feature matrix based on the feature dimension, retain the corresponding feature information, and determine a reduced-dimensional feature matrix;

[0034] A matrix addition operation is performed on the dynamic edge feature matrix and the dimension reduction feature matrix to obtain a residual feature matrix; and the residual feature matrix is ​​normalized to obtain an optimized dynamic edge feature matrix.

[0035] In an optional embodiment,

[0036] The user data of the private domain user relationship graph is dispersedly stored in multiple local computing nodes, and a federated graph neural network model including a spatiotemporal attention layer is respectively constructed on the multiple local computing nodes. The processing results of multiple local computing nodes are integrated using a secure aggregation protocol to obtain a user node representation vector including:

[0037] Obtain historical geographic location information of user nodes in a private domain user relationship graph; calculate the geographic activity center coordinates of each user node according to the historical geographic location information; perform clustering operations on the geographic activity center coordinates to divide the user nodes into multiple local computing nodes; for the connection relationship between user nodes connected to different local computing nodes, copy the information of the connection relationship to the associated local computing nodes; form subgraph data with the user nodes and corresponding connection relationships of each local computing node;

[0038] Constructing a graph neural network model at each local computing node, the graph neural network model comprising a time attention layer, a spatial attention layer and a graph convolution layer; based on the behavior timestamp, behavior duration and behavior type of the user node in the subgraph data, calculating the behavior temporal importance score through the time attention layer to generate a time attention feature; based on the geographic distance relationship between the user nodes in the subgraph data, calculating the spatial correlation score through the spatial attention layer to generate a spatial attention feature;

[0039] Fusing the temporal attention feature and the spatial attention feature with the user node feature in the subgraph data, inputting the result into the graph convolution layer, and generating a user node fusion representation of the local computing node;

[0040] Generate an encryption public key and a decryption private key corresponding to the security aggregation, distribute the encryption public key to each local computing node, generate a random noise matrix at each local computing node, add the user node fusion representation to the random noise matrix to obtain a noise mask representation, and use the encryption public key to encrypt the noise mask representation to obtain a local encrypted representation;

[0041] Perform homomorphic encryption operations on the local encrypted representations corresponding to all local computing nodes to obtain an encrypted aggregate representation, and use a decryption private key to decrypt the encrypted aggregate representation to obtain a noisy aggregate representation;

[0042] A secure communication channel is established between local computing nodes, and random noise matrices are exchanged; all random noise matrices are superimposed to obtain an overall noise matrix, and the overall noise matrix is ​​removed from the noisy aggregate representation to obtain a final user node representation vector.

[0043] In an optional embodiment,

[0044] The social influence index and the relationship strength index between users are calculated according to the user node representation vector, and the social influence index and the relationship strength index are clustered and analyzed by the spectral clustering method to obtain the initial social circle structure including:

[0045] Calculating a similarity matrix between user nodes based on user node representation vectors, and constructing a first weighted adjacency matrix based on the similarity matrix; calculating the eigenvector centrality of each user node in the first weighted adjacency matrix to obtain a first influence index;

[0046] Obtain historical interaction records of the user node, construct a time decay function, apply the time decay function to the number of interactions in the historical interaction records to obtain a weighted interaction frequency, and divide the weighted interaction frequency by a preset time window length to obtain a second influence indicator;

[0047] Obtaining the content propagation record of the user node, constructing an information cascade tree based on the content propagation record, wherein the information cascade tree includes the propagation path of the content published by the user node; calculating the level depth value and the node breadth value of the information cascade tree; calculating a third influence indicator based on the level depth value and the node breadth value;

[0048] Performing a weighted combination of the first influence indicator, the second influence indicator, and the third influence indicator to generate a social influence indicator;

[0049] Obtain the number of common friends between user nodes, and obtain the interaction time series between user nodes; calculate the distribution overlap of the interaction time series; obtain the interest tags of user nodes; calculate the cosine similarity of the interest tags; obtain the direct interaction data between user nodes; combine the number of common friends, the distribution overlap, the cosine similarity and the direct interaction data to form a relationship strength vector;

[0050] Construct an empty affinity matrix, wherein for any two directly connected user nodes, the social influence index and the relationship strength vector of the two user nodes are weightedly combined as the affinity value of the corresponding position in the affinity matrix; for any two user nodes that are not directly connected, based on the multi-hop path between the two user nodes, the attenuated propagation value of the social influence index and the relationship strength vector on the path is calculated as the affinity value of the corresponding position in the affinity matrix; the calculation is repeated until the complete affinity matrix is ​​filled;

[0051] Calculate the degree matrix of the affinity matrix, calculate the Laplace matrix based on the affinity matrix and the degree matrix, calculate the eigenvalues ​​and corresponding eigenvectors of the Laplace matrix, select the eigenvectors corresponding to the smallest number of non-zero eigenvalues ​​according to a preset number, construct a feature matrix, perform clustering operations on the row vectors of the feature matrix, and obtain an initial social circle structure.

[0052] In an optional embodiment,

[0053] Performing causal intervention analysis to verify the stability of the initial social circle structure and determine the final social circle structure includes:

[0054] Based on the user node representation vector, a node causal relationship graph is constructed, the causal correlation strength of the data in the node causal relationship graph to the initial social circle structure is calculated, and a set of variables to be verified is generated;

[0055] For each variable to be verified in the set of variables to be verified, an intervention operation is performed:

[0056] According to a preset intervention ratio, a target user node is randomly selected from all user nodes; the value of the variable to be verified corresponding to the target user node is changed to a preset intervention value; based on the changed variable to be verified, the social influence score of the target user node is recalculated, and based on the social influence score, the relationship strength score of the target user node is recalculated;

[0057] Based on the updated social influence score and relationship strength score of the target user node, the circles are re-divided to obtain the intervention circle structure, and the member overlap rate between the intervention circle structure and the initial social circle structure is calculated; the number deviation value between the number of intervention circles in the intervention circle structure and the number of initial circles in the initial social circle structure is calculated; the boundary fuzziness between adjacent circles in the intervention circle structure is calculated;

[0058] For each variable to be verified in the set of variables to be verified, the intervention operation is repeatedly performed according to a preset number of interventions to obtain overlapping rates, quantity deviation values, and boundary fuzziness of multiple groups of members; the corresponding means and variances are calculated to obtain distribution feature data;

[0059] Based on the causal association strength and the distribution characteristic data, identifying the influencing variables corresponding to the initial social circle structure; for the influencing variables, calculating the stability threshold based on the distribution characteristic data;

[0060] When the change amplitude of the influencing variable is less than the stability threshold, the initial social circle structure is adjusted to obtain the final social circle structure.

[0061] According to a second aspect of the embodiments of the present invention,

[0062] A private domain social relationship mining system based on graph neural network is provided, comprising:

[0063] The first unit is used to obtain historical behavior data of multiple users in the target private domain platform; use the knowledge graph technology to align the historical behavior data with the external domain knowledge base for entity and relationship mapping to generate user behavior feature data; construct a node feature matrix based on the user behavior feature data; use a time-series-aware dynamic encoder to process the user interaction sequence in the user behavior feature data to generate a dynamic edge feature matrix; fuse the node feature matrix and the dynamic edge feature matrix to construct a private domain user relationship graph;

[0064] The second unit is used to disperse and store the user data of the private domain user relationship graph to multiple local computing nodes, respectively construct a federated graph neural network model including a spatiotemporal attention layer on the multiple local computing nodes, and adopt a secure aggregation protocol to integrate the processing results of the multiple local computing nodes to obtain a user node representation vector;

[0065] The third unit is used to calculate the social influence index and the relationship strength index between users according to the user node representation vector, and use the spectral clustering method to perform cluster analysis on the social influence index and the relationship strength index to obtain the initial social circle structure; perform causal intervention analysis to verify the stability of the initial social circle structure and determine the final social circle structure; generate a social relationship analysis report based on the final social circle structure, social influence index and relationship strength index.

[0066] According to a third aspect of the embodiments of the present invention,

[0067] An electronic device is provided, comprising:

[0068] processor;

[0069] a memory for storing processor-executable instructions;

[0070] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0071] A fourth aspect of the embodiments of the present invention is:

[0072] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0073] In an embodiment of the present invention, knowledge graph technology is used to combine user behavior data with an external knowledge base to enrich user feature information, and a time-aware dynamic encoder is used to capture the dynamic changes of user interactions, thereby more accurately characterizing user relationships and improving the accuracy of social relationship mining; a federated graph neural network model is used to store user data in a distributed manner on multiple local computing nodes for processing, and a secure aggregation protocol is used to integrate the results, thereby avoiding the risk of privacy leakage caused by centralized storage of data and effectively protecting user data privacy; the stability of the initial social circle structure is verified through causal intervention analysis, thereby avoiding erroneous results caused by data fluctuations or algorithm deviations, ensuring the reliability and stability of the final social circle structure, and making the generated social relationship analysis report more valuable for reference. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 A schematic diagram of the process of a private domain social relationship mining method based on a graph neural network according to an embodiment of the present invention;

[0075] Figure 2 This is a schematic diagram of the structure of a private domain social relationship mining system based on a graph neural network according to an embodiment of the present invention. DETAILED DESCRIPTION

[0076] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0077] The technical solution of the present invention is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0078] Figure 1 Schematic diagram of the process of a private domain social relationship mining method based on a graph neural network according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0079] S101. Obtain historical behavior data of multiple users in the target private domain platform; use knowledge graph technology to perform entity alignment and relationship mapping on the historical behavior data and the external domain knowledge base to generate user behavior feature data; construct a node feature matrix based on the user behavior feature data; use a time-series-aware dynamic encoder to process the user interaction sequence in the user behavior feature data to generate a dynamic edge feature matrix; fuse the node feature matrix and the dynamic edge feature matrix to construct a private domain user relationship graph;

[0080] Obtaining historical behavior data of users in the target private domain platform, wherein the historical behavior data includes user interaction data, behavior trajectory data, and content browsing data;

[0081] Establishing a preprocessing module for an external domain knowledge base, the preprocessing module includes a knowledge entity index and a relationship type mapping table; aligning entities in the historical behavior data using the knowledge entity index; mapping user behaviors in the historical behavior data into standardized relationships based on the relationship type mapping table; generating user behavior feature data containing entity information and relationship information;

[0082] Constructing a node feature matrix based on entity information in the user behavior feature data, wherein each row of the node feature matrix represents a feature vector of a user node;

[0083] Constructing a time-series-aware dynamic encoder, the time-series-aware dynamic encoder comprising a time-series feature extraction layer and a dynamic relationship encoding layer; inputting a user interaction sequence in the user behavior feature data into the time-series-aware dynamic encoder; capturing a time-series pattern of user interaction through the time-series feature extraction layer; and converting the time-series pattern into a dynamic edge feature matrix through the dynamic relationship encoding layer;

[0084] A feature fusion network is used to fuse the node feature matrix and the dynamic edge feature matrix to construct a private domain user relationship graph, wherein the private domain user relationship graph includes static features of user nodes and dynamic relationship features between nodes.

[0085] In this embodiment, knowledge graph technology is used to align entities and map relationships between user historical behavior data and external domain knowledge bases, achieve efficient integration of multi-source heterogeneous data, and enrich user feature information; the user interaction sequence is modeled through a time-aware dynamic encoder to accurately capture the temporal changes in user behavior and improve the dynamic adaptability of feature modeling; a node feature matrix and a dynamic edge feature matrix are constructed to retain individual characteristics and reflect interactive relationships, thereby achieving comprehensiveness and hierarchy in feature extraction; the node and edge feature matrices are fused to construct a private domain user relationship graph, deeply mine relationships between users, and reveal potential behavior patterns and connections; through a complete modeling and feature construction process, a high-quality data foundation and model support are provided for applications such as user behavior analysis and recommendation system optimization.

[0086] S102. Distribute and store the user data of the private domain user relationship graph to multiple local computing nodes, respectively construct a federated graph neural network model including a spatiotemporal attention layer on the multiple local computing nodes, adopt a secure aggregation protocol, integrate the processing results of the multiple local computing nodes, and obtain a user node representation vector;

[0087] In this embodiment, by distributing and storing user data in multiple local computing nodes, the risk of privacy leakage caused by centralized storage is effectively reduced and data security is enhanced; a federated graph neural network model including a spatiotemporal attention layer is constructed in each local node to accurately capture the spatiotemporal correlation characteristics of user behavior and improve the modeling effect; a secure aggregation protocol is used to integrate local computing results without directly transmitting the original data, thereby protecting user data privacy and ensuring the security of the modeling process; through distributed modeling and secure aggregation, user node representation vectors are generated to fully express user characteristics and support subsequent personalized analysis and application; the application of federated graph neural networks in private domain user relationship graphs is realized, taking into account both data privacy and model performance, and providing an efficient solution for privacy computing and graph analysis.

[0088] S103. Calculate the social influence index and the relationship strength index between users according to the user node representation vector, use the spectral clustering method to perform cluster analysis on the social influence index and the relationship strength index to obtain the initial social circle structure; perform causal intervention analysis to verify the stability of the initial social circle structure and determine the final social circle structure; generate a social relationship analysis report based on the final social circle structure, social influence index and relationship strength index.

[0089] Based on the user node representation vector, an influence calculation model is constructed to calculate the social influence index between users; a relationship strength calculation model is constructed to calculate the relationship strength index between users; the social influence index includes the user interaction frequency score, the content dissemination ability score and the group participation score; the relationship strength index includes the interaction duration score, the emotional tendency score and the common interest score;

[0090] Using a spectral clustering method to perform multi-dimensional clustering analysis on the social influence index and the relationship strength index to obtain an initial social circle structure;

[0091] Perform causal intervention analysis to verify the stability of the initial social circle structure, including:

[0092] Construct a causal relationship graph of the user node data; calculate the causal correlation strength of each data in the causal relationship graph to the initial social circle structure, and generate a set of variables to be verified; randomly select a target user node from the user node data according to a preset intervention ratio; change the value of the variable to be verified corresponding to the target user node to a preset intervention value; recalculate the social influence score and relationship strength score of the target user node based on the changed variable to be verified; re-divide the circles based on the updated scores to obtain the post-intervention circle structure; calculate the evaluation indicators of the post-intervention circle structure, including member overlap rate, circle number deviation value and boundary fuzziness; identify key variables based on the evaluation indicators and calculate the stability threshold; when the change amplitude of the key variable is less than the stability threshold, determine the final social circle structure;

[0093] A social relationship analysis report is generated based on the final social circle structure, the social influence index and the relationship strength index, and the social relationship analysis report includes a circle structure diagram, key user distribution and circle interaction characteristics.

[0094] In this embodiment, social influence and relationship strength indicators are calculated through user node representation vectors to quantify social characteristics between users and provide data support for circle analysis; spectral clustering methods are used to perform cluster analysis on social influence and relationship strength, quickly generate an initial social circle structure, and reveal user group characteristics; the stability of the initial social circle structure is verified through causal intervention analysis to ensure the accuracy and reliability of circle division; combined with the final social circle structure and key indicators, a comprehensive social relationship analysis report is generated to provide deep insights for user behavior research and social strategy optimization; based on the analysis results, it assists in applications such as personalized recommendations and group behavior prediction, providing a scientific basis for business strategy formulation and social network optimization.

[0095] In an optional implementation, using a time-series-aware dynamic encoder to process the user interaction sequence in the user behavior feature data to generate a dynamic edge feature matrix includes:

[0096] The historical behavior data includes user identification, interaction type, interaction timestamp and interaction object;

[0097] Constructing a user interaction sequence according to the interaction timestamps in the historical behavior data, wherein the user interaction sequence records the interaction records between the user and the interaction object in chronological order; dividing the user interaction sequence into a plurality of interaction subsequences according to a preset time window; calculating the occurrence frequency and transition probability of the interaction objects in the interaction subsequences to generate a sequence feature vector;

[0098] Using a bidirectional long short-term memory conditional random field model to identify entity mentions from the historical behavior data; combining the sequence feature vector with the semantic features of the entity mention to generate entity matching features; calculating the matching degree with the candidate entity in the external domain knowledge base based on the entity matching features; and selecting the candidate entity with the highest matching degree as the link entity;

[0099] Execute a label propagation algorithm on the linked entities to obtain entity community division results; determine a sampling probability distribution according to the structural closeness between entities in the entity community division results; obtain neighbor entities within a preset hop count range in the external domain knowledge base based on the sampling probability distribution to form a local knowledge subgraph, and decompose the relationship path between entities in the local knowledge subgraph into multiple time-dependent subpaths;

[0100] A timing-aware dynamic encoder including an interaction sequence encoding layer and a dynamic feature fusion layer is constructed, and the user interaction sequence and the timing-dependent subpath are input into the timing-aware dynamic encoder; the timing dependency of the interaction sequence is extracted in the interaction sequence encoding layer; the timing dependency, the node feature matrix and the timing-dependent subpath are integrated in the dynamic feature fusion layer; and a dynamic edge feature matrix is ​​generated.

[0101] In a specific implementation, first, a user interaction sequence is extracted from the user's historical behavior data. The historical behavior data includes a user identifier, an interaction type, an interaction timestamp, and an interaction object. For example, user A browsed product B at 10:00 on January 1, 2024, browsed product C at 10:05, and purchased product B at 10:10. These behavior records constitute the original interaction data of user A. According to the interaction timestamp, these interaction records are sorted in chronological order to form the interaction sequence of user A: [product B (browsing), product C (browsing), product B (purchase)]. In order to capture short-term changes in user interests, the user interaction sequence is divided into multiple interaction subsequences according to a preset time window (e.g., 30 minutes). Assuming the time window is 10 minutes, the interaction sequence of user A will be divided into two subsequences: [product B (browsing), product C (browsing)] and [product B (purchase)]. For each subsequence, the occurrence frequency and transition probability of the interactive objects are counted. For example, in the first subsequence, the occurrence frequencies of products B and C are both 1, the transition probability from product B to product C is 1, and the transition probability from product C to product B is 0. These statistical information are converted into vector representation to form a sequence feature vector.

[0102] Next, entity mentions are identified from historical behavior data. A bidirectional long short-term memory conditional random field model (BiLSTM-CRF) is used to identify entities. For example, in the user review "This phone takes great photos and has a long battery life", "photo effects" and "battery life" are identified as entity mentions. The sequence feature vector is combined with the semantic features of the entity mention (such as word vectors) to generate entity matching features. Based on the entity matching features, the matching degree with the candidate entities in the external domain knowledge base is calculated. For example, "photo effects" is matched with the "camera" entity in the knowledge base and their similarity is calculated. The candidate entity with the highest matching degree is selected as the link entity. For example, "camera" is selected as the link entity of "photo effects".

[0103] Then, the label propagation algorithm is executed on the linked entities to divide the entities in the knowledge base into different communities. The sampling probability distribution is determined according to the structural closeness between entities in the entity community division results (for example, the number of common neighbors). Based on the sampling probability distribution, the neighbor entities within the preset hop count (for example, 2 hops) are obtained in the external domain knowledge base to form a local knowledge subgraph. For example, the 2-hop neighbor entities of "camera" may include "lens", "sensor", "mobile phone", etc., which are connected by relationships such as "component" and "function" to form a local knowledge subgraph. The relationship path between entities in the local knowledge subgraph is decomposed into multiple temporal dependent subpaths. For example, the path "camera-component-lens-function-photograph" can be decomposed into two subpaths: "camera-component-lens" and "lens-function-photograph".

[0104] Finally, a time-aware dynamic encoder is constructed. The encoder includes an interaction sequence encoding layer and a dynamic feature fusion layer. The user interaction sequence and the time-dependent subpath are input to the encoder. In the interaction sequence encoding layer, the time-dependent relationship of the interaction sequence is extracted using, for example, a Transformer model. In the dynamic feature fusion layer, the time-dependent relationship of the interaction sequence, the node feature matrix (such as the word vector of the entity), and the time-dependent subpath information are integrated to generate a dynamic edge feature matrix. This matrix reflects the dynamic association strength between the user interaction sequence and the entities in the knowledge graph.

[0105] In this embodiment, by combining the temporal information of the user behavior sequence and the semantic information of the external knowledge base, the dynamic evolution of the user's interests can be captured more accurately and the limitations of static modeling can be avoided; by introducing the knowledge graph, the user behavior is associated with the entity, providing richer explanatory information and improving the comprehensibility of the model; based on the dynamic edge feature matrix, the user's future behavior can be predicted more effectively, thereby improving the accuracy and personalization of the recommendation system.

[0106] In an optional implementation, executing a label propagation algorithm on the link entity to obtain an entity community division result includes:

[0107] Counting the number of connections between each linked entity and other linked entities to obtain a node connection number statistical value, and calculating the node degree centrality of each linked entity according to the node connection number statistical value; sorting the linked entities in descending order based on the node degree centrality to generate a node influence sequence;

[0108] Based on the node influence sequence, determine the number, set the number as the initial label value of the link entity, and generate an initial label sequence; determine the adjacent entity set of each link entity according to the connection relationship between the link entities; combine the label values ​​of each entity in the adjacent entity set into a label update candidate set;

[0109] According to the order of the node influence sequence from large to small, a label update operation is performed on each of the link entities:

[0110] Count the number of occurrences of each label value in the label update candidate set corresponding to the current link entity to generate a label frequency sequence; select the label value with the largest number of occurrences from the label frequency sequence as the target label value; when there are multiple label values ​​with the largest number of occurrences in the label frequency sequence, select the label value with the smallest value as the target label value; update the target label value to the label value of the current link entity;

[0111] Divide the linked entities with the same label value into the same community to obtain the community division result of the current round;

[0112] Calculate the number of entities in the same community in the community division results of the current round and the community division results of the previous round to generate a community overlap; divide the community overlap by the total number of linked entities to obtain a community stability coefficient;

[0113] Repeat the iteration until the community stability coefficient is greater than a preset stability threshold, determine the community division result corresponding to the current round as the final result, and obtain the entity community division result.

[0114] In a specific implementation, first, the number of connections between each link entity and other link entities is counted. For example, in a social network, the number of connections between each user and other users is counted, such as user A is connected to 3 users, user B is connected to 5 users, user C is connected to 2 users, and so on, to obtain the statistical value of the number of connections for each user.

[0115] Then, the node degree centrality of each linked entity is calculated based on the number of node connection statistics. Node degree centrality is used to measure the importance of a linked entity in the network. The more connections, the higher the node degree centrality. For example, user B has the most connections, so its node degree centrality is the highest.

[0116] Next, the linked entities are sorted in descending order based on the node degree centrality to generate a node influence sequence. The node influence sequence reflects the influence of the linked entities in the network, with entities with greater influence at the front. For example, by sorting the node degree centrality from high to low, we get a node influence sequence such as user B, user A, and user C.

[0117] Then, based on the node influence sequence, the number is determined and set as the initial label value of the linked entity to generate the initial label sequence. For example, the initial label value of user B is set to 1, the initial label value of user A is set to 2, the initial label value of user C is set to 3, and so on.

[0118] Next, based on the connection relationship between the linked entities, the adjacent entity set of each linked entity is determined. The adjacent entity set refers to other entities that are directly connected to the entity. For example, if user A is connected to user B and user C, then the adjacent entity set of user A is user B and user C.

[0119] Then, the label values ​​of each entity in the adjacent entity set are combined into a label update candidate set. For example, if the adjacent entity set of user A is {user B, user C}, and the corresponding label values ​​are {1, 3}, then the label update candidate set of user A is {1, 3}.

[0120] Next, the label update operation is performed on each linked entity in the descending order of the node influence sequence. For example, the label update operation is performed on user B first, then the label update operation is performed on user A, and so on.

[0121] For each linked entity, count the number of occurrences of each label value in its corresponding label update candidate set to generate a label frequency sequence. For example, if user A's label update candidate set is {1, 3, 1}, then the label frequency sequence is {1:2, 3:1}.

[0122] Select the tag value with the largest number of occurrences from the tag frequency sequence as the target tag value. For example, in user A’s tag frequency sequence, tag value 1 appears the most times, so the target tag value is 1.

[0123] When there are multiple label values ​​with the largest number of occurrences in the label frequency sequence, the label value with the smallest value is selected as the target label value. For example, if the label frequency sequence is {1:2, 3:2}, the label value 1 with the smaller value is selected as the target label value.

[0124] Update the target label value to the label value of the current linked entity. For example, update the label value of user A to 1.

[0125] The linked entities with the same label value are divided into the same community to obtain the community division result of the current round. For example, the entity with a label value of 1 is divided into one community, and the entity with a label value of 3 is divided into another community.

[0126] Calculate the number of entities in the same community between the community division results of the current round and the community division results of the previous round to generate the community overlap. For example, if the communities in the previous round are {A, B} and {C, D}, and this round is {A, B} and {C, E}, then the community overlap is 2 (A and B).

[0127] Divide the community overlap by the total number of linked entities to get the community stability coefficient. For example, if the total number of linked entities is 5 and the community overlap is 2, then the community stability coefficient is 2 / 5=0.4.

[0128] Repeat the iteration until the community stability coefficient is greater than a preset stability threshold, such as 0.9. The community division result corresponding to the current round is determined as the final result to obtain the entity community division result.

[0129] In this embodiment, by iteratively updating the label value, the community division result is made more stable and accurate, and can better reflect the real relationship between the linked entities; the label propagation algorithm is adopted, which has low computational complexity and is suitable for processing large-scale data; the community division is based on the connection relationship and influence of the linked entities, and the result is easier to understand and explain, which is convenient for users to conduct subsequent analysis.

[0130] In an optional implementation, the dynamic edge feature matrix further includes:

[0131] Separating the dynamic edge feature matrix into a structural feature sub-matrix, a semantic feature sub-matrix and a temporal feature sub-matrix;

[0132] Performing feature decomposition operations on the structural feature submatrix, the semantic feature submatrix, and the temporal feature submatrix, respectively, to obtain main feature components; calculating the probability distribution of non-zero elements in the main feature components, and calculating information entropy scores based on the probability distribution;

[0133] Constructing a multi-head attention network, the multi-head attention network comprises a query transformation layer, a key transformation layer and a value transformation layer; inputting the structural feature submatrix, the semantic feature submatrix and the temporal feature submatrix into the query transformation layer, the key transformation layer and the value transformation layer respectively to obtain a query matrix, a key matrix and a value matrix; performing a matrix multiplication operation on the query matrix and the key matrix to obtain an attention score matrix; performing a normalization process on the attention score matrix and performing a matrix multiplication operation with the value matrix to obtain a channel feature representation;

[0134] Constructing a feature fusion gating network, wherein the feature fusion gating network includes an update gate and a reset gate; inputting the channel feature representation into the feature fusion gating network, calculating the importance weight of each channel feature through the update gate, controlling the transmission of feature information through the reset gate, performing weighted combination of the channel feature representation based on the importance weight, and generating a fusion feature matrix;

[0135] Compare the information entropy score with a preset information entropy threshold, select a feature dimension corresponding to a value greater than the information entropy threshold, perform a dimensionality reduction operation on the fused feature matrix based on the feature dimension, retain the corresponding feature information, and determine a reduced-dimensional feature matrix;

[0136] A matrix addition operation is performed on the dynamic edge feature matrix and the dimension reduction feature matrix to obtain a residual feature matrix; and the residual feature matrix is ​​normalized to obtain an optimized dynamic edge feature matrix.

[0137] In a specific implementation, first, a dynamic edge feature matrix is ​​constructed. The matrix integrates multiple feature information of each edge in the graph at different times. For example, in a social network, the edge represents the relationship between users, and its features may include the frequency of interaction between users, the emotional tendency of the interactive content, the time when the relationship was established, etc. Assuming a dynamic graph containing 5 nodes and 6 edges, the time step is 3, then the dimension of the dynamic edge feature matrix is ​​6×3×K, where K represents the feature dimension, assuming K=5, and each element represents the eigenvalue corresponding to a specific edge at a specific time. For example, the first row of the matrix can represent the five eigenvalues ​​of edge 1 in three time steps: [[1, 2, 0, 0.5, 1], [1.5, 2.2, 0.1, 0.6, 1.2], [1.2, 2.5, 0.2, 0.7, 1.5]].

[0138] Next, the dynamic edge feature matrix is ​​decomposed into a structural feature sub-matrix, a semantic feature sub-matrix, and a temporal feature sub-matrix. For example, the first two feature dimensions [1, 2], [1.5, 2.2], [1.2, 2.5] represent structural features, the middle two feature dimensions [0, 0.5], [0.1, 0.6], [0.2, 0.7] represent semantic features, and the last feature dimension [1], [1.2], [1.5] represents temporal features.

[0139] Then, perform eigendecomposition on each submatrix to extract the main eigencomponents. Eigendecomposition can be performed using methods such as principal component analysis. Calculate the probability distribution of non-zero elements in the main eigencomponents, and calculate the information entropy score based on the probability distribution. The higher the information entropy score, the richer the information contained in the feature dimension. Assume that the information entropy score of the structural feature submatrix is ​​0.8, the information entropy score of the semantic feature submatrix is ​​0.5, and the information entropy score of the temporal feature submatrix is ​​0.2.

[0140] Construct a multi-head attention network, which includes a query transformation layer, a key transformation layer, and a value transformation layer. Input the structural feature submatrix into the query transformation layer, the semantic feature submatrix into the key transformation layer, and the temporal feature submatrix into the value transformation layer to obtain the query matrix, key matrix, and value matrix. Perform matrix multiplication on the query matrix and the key matrix to obtain the attention score matrix. Normalize the attention score matrix and perform matrix multiplication with the value matrix to obtain the channel feature representation.

[0141] Construct a feature fusion gating network, which includes an update gate and a reset gate. Input the channel feature representation into the feature fusion gating network. Calculate the importance weight of each channel feature through the update gate, and control the transmission of feature information through the reset gate. Perform a weighted combination of the channel feature representations based on the importance weights to generate a fusion feature matrix.

[0142] Compare the information entropy score with the preset information entropy threshold. Assuming the information entropy threshold is 0.4, the dimensions corresponding to the structural features and semantic features will be retained. Based on the selected feature dimensions, perform dimensionality reduction on the fused feature matrix, retain the corresponding feature information, and determine the reduced dimension feature matrix.

[0143] The dynamic edge feature matrix and the dimension reduction feature matrix are added to obtain the residual feature matrix. The residual feature matrix is ​​normalized to obtain the optimized dynamic edge feature matrix.

[0144] In this embodiment, through the multi-head attention mechanism, the method can effectively capture different aspects of information in dynamic edge features and learn the correlation between different features, thereby improving the expressiveness of the features; through information entropy scoring and feature fusion gating network, the method can adaptively select important feature dimensions and control the transmission of feature information, thereby avoiding the interference of redundant information and improving the efficiency of the model; the introduction of residual connections can effectively alleviate the gradient vanishing problem, enhance the robustness of the model, and improve the training efficiency of the model.

[0145] In an optional implementation, user data of the private domain user relationship graph is dispersedly stored in multiple local computing nodes, a federated graph neural network model including a spatiotemporal attention layer is constructed on each of the multiple local computing nodes, and a secure aggregation protocol is adopted to integrate the processing results of the multiple local computing nodes to obtain a user node representation vector, including:

[0146] Obtain historical geographic location information of user nodes in a private domain user relationship graph; calculate the geographic activity center coordinates of each user node according to the historical geographic location information; perform clustering operations on the geographic activity center coordinates to divide the user nodes into multiple local computing nodes; for the connection relationship between user nodes connected to different local computing nodes, copy the information of the connection relationship to the associated local computing nodes; form subgraph data with the user nodes and corresponding connection relationships of each local computing node;

[0147] Constructing a graph neural network model at each local computing node, the graph neural network model comprising a time attention layer, a spatial attention layer and a graph convolution layer; based on the behavior timestamp, behavior duration and behavior type of the user node in the subgraph data, calculating the behavior temporal importance score through the time attention layer to generate a time attention feature; based on the geographic distance relationship between the user nodes in the subgraph data, calculating the spatial correlation score through the spatial attention layer to generate a spatial attention feature;

[0148] Fusing the temporal attention feature and the spatial attention feature with the user node feature in the subgraph data, inputting the result into the graph convolution layer, and generating a user node fusion representation of the local computing node;

[0149] Generate an encryption public key and a decryption private key corresponding to the security aggregation, distribute the encryption public key to each local computing node, generate a random noise matrix at each local computing node, add the user node fusion representation to the random noise matrix to obtain a noise mask representation, and use the encryption public key to encrypt the noise mask representation to obtain a local encrypted representation;

[0150] Perform homomorphic encryption operations on the local encrypted representations corresponding to all local computing nodes to obtain an encrypted aggregate representation, and use a decryption private key to decrypt the encrypted aggregate representation to obtain a noisy aggregate representation;

[0151] A secure communication channel is established between local computing nodes, and random noise matrices are exchanged; all random noise matrices are superimposed to obtain an overall noise matrix, and the overall noise matrix is ​​removed from the noisy aggregate representation to obtain a final user node representation vector.

[0152] In a specific implementation, first, private domain user relationship graph data is obtained. The data contains user node information and the connection relationship between user nodes. User node information includes user ID, historical geographic location information (longitude, latitude, timestamp), behavior information (behavior type, behavior duration, behavior timestamp), etc. The connection relationship between user nodes represents the interaction between users, such as friend relationship, transaction relationship, etc.

[0153] For example, user A’s historical geographic location information can be represented as a series of records: [(longitude 1, latitude 1, timestamp 1), (longitude 2, latitude 2, timestamp 2), …], and behavior information can be represented as: [(behavior type 1, duration 1, timestamp 3), (behavior type 2, duration 2, timestamp 4), …]. The connection relationship between user A and user B can be represented as: (user A ID, user B ID, relationship type).

[0154] Next, calculate the coordinates of the geographic activity center of each user node. Traverse the historical geographic location information of each user node, calculate the average of longitude and latitude, and obtain the coordinates of the geographic activity center of the user. For example, the historical geographic location information of user A is [(116.3, 39.9, 1678886400), (116.4, 40.0, 1678972800)], then the coordinates of its geographic activity center are (116.35, 39.95).

[0155] Then, cluster the coordinates of the geographic activity centers of all users and divide the user nodes into multiple local computing nodes. The K-Means clustering algorithm can be used to pre-set the number of local computing nodes K, take the coordinates of the geographic activity centers of all users as input, and divide the users into K clusters. Each cluster corresponds to a local computing node.

[0156] For example, assuming that K=3 is set, the users are divided into three clusters using the K-Means algorithm. Users A, B, and C are divided into the first local computing node, users D and E are divided into the second local computing node, and users F and G are divided into the third local computing node.

[0157] For the connection relationship between user nodes connected to different local computing nodes, the information of the connection relationship is copied to the associated local computing nodes. For example, if there is a connection relationship between user A (belonging to the first local computing node) and user D (belonging to the second local computing node), the information of the connection relationship is copied to the first and second local computing nodes.

[0158] The user nodes and corresponding connection relationships of each local computing node are formed into subgraph data. For example, the subgraph data of the first local computing node includes users A, B, C and the connection relationships between them, as well as the connection relationship between user A and user D.

[0159] A graph neural network model is built on each local computing node. The model contains a temporal attention layer, a spatial attention layer, and a graph convolution layer.

[0160] Based on the behavior timestamp, behavior duration, and behavior type of the user node in the subgraph data, the behavior time sequence importance score is calculated through the temporal attention layer to generate the temporal attention feature. For example, in the behavior sequence of user A, the behaviors with different timestamps have different importance, and the importance score of each behavior is learned through the temporal attention mechanism.

[0161] Based on the geographical distance relationship between user nodes in the subgraph data, the spatial correlation score is calculated through the spatial attention layer to generate spatial attention features. For example, if the geographical distance between user A and user B is close, the spatial correlation score between them is high.

[0162] The temporal attention features and spatial attention features are fused with the user node features in the subgraph data and input into the graph convolution layer to generate the user node fusion representation of the local computing node.

[0163] Generate the encryption public key and decryption private key corresponding to the security aggregation, and distribute the encryption public key to each local computing node. Generate a random noise matrix at each local computing node, add the user node fusion representation to the random noise matrix to obtain the noise mask representation. Use the encryption public key to encrypt the noise mask representation to obtain the local encrypted representation.

[0164] Perform homomorphic encryption operations on the local encrypted representations corresponding to all local computing nodes to obtain an encrypted aggregate representation. Use the decryption private key to decrypt the encrypted aggregate representation to obtain a noisy aggregate representation.

[0165] A secure communication channel is established between local computing nodes, and random noise matrices are exchanged. All random noise matrices are superimposed to obtain the overall noise matrix, which is removed from the noisy aggregate representation to obtain the final user node representation vector.

[0166] In this embodiment, through the secure aggregation mechanism and homomorphic encryption technology, the user's original data is avoided from being leaked during the aggregation process, and the user's privacy is effectively protected; the user data is dispersed to multiple local computing nodes for parallel processing, which greatly improves the computing efficiency and shortens the processing time; combined with the time and space attention mechanism, the spatiotemporal characteristics of user behavior are more effectively captured, and the quality of the user node representation vector is improved, thereby improving the performance of subsequent tasks (such as user profiling, recommendation systems, etc.).

[0167] In an optional implementation, the social influence index and the relationship strength index between users are calculated according to the user node representation vector, and the social influence index and the relationship strength index are clustered by using a spectral clustering method to obtain an initial social circle structure, which includes:

[0168] Calculating a similarity matrix between user nodes based on user node representation vectors, and constructing a first weighted adjacency matrix based on the similarity matrix; calculating the eigenvector centrality of each user node in the first weighted adjacency matrix to obtain a first influence index;

[0169] Obtain historical interaction records of the user node, construct a time decay function, apply the time decay function to the number of interactions in the historical interaction records to obtain a weighted interaction frequency, and divide the weighted interaction frequency by a preset time window length to obtain a second influence indicator;

[0170] Obtaining the content propagation record of the user node, constructing an information cascade tree based on the content propagation record, wherein the information cascade tree includes the propagation path of the content published by the user node; calculating the level depth value and the node breadth value of the information cascade tree; calculating a third influence indicator based on the level depth value and the node breadth value;

[0171] Performing a weighted combination of the first influence indicator, the second influence indicator, and the third influence indicator to generate a social influence indicator;

[0172] Obtain the number of common friends between user nodes, and obtain the interaction time series between user nodes; calculate the distribution overlap of the interaction time series; obtain the interest tags of user nodes; calculate the cosine similarity of the interest tags; obtain the direct interaction data between user nodes; combine the number of common friends, the distribution overlap, the cosine similarity and the direct interaction data to form a relationship strength vector;

[0173] Construct an empty affinity matrix, wherein for any two directly connected user nodes, the social influence index and the relationship strength vector of the two user nodes are weightedly combined as the affinity value of the corresponding position in the affinity matrix; for any two user nodes that are not directly connected, based on the multi-hop path between the two user nodes, the attenuated propagation value of the social influence index and the relationship strength vector on the path is calculated as the affinity value of the corresponding position in the affinity matrix; the calculation is repeated until the complete affinity matrix is ​​filled;

[0174] Calculate the degree matrix of the affinity matrix, calculate the Laplace matrix based on the affinity matrix and the degree matrix, calculate the eigenvalues ​​and corresponding eigenvectors of the Laplace matrix, select the eigenvectors corresponding to the smallest number of non-zero eigenvalues ​​according to a preset number, construct a feature matrix, perform clustering operations on the row vectors of the feature matrix, and obtain an initial social circle structure.

[0175] The information cascade tree specifically refers to a structured model used to represent the process of information dissemination in a social network, in which: nodes represent user nodes, and each node corresponds to a user participating in information dissemination; edges represent the paths of information dissemination between nodes, that is, a user transmits information to another user through social interaction; hierarchical depth represents the number of layers that information passes through during the dissemination process, reflecting the hierarchical relationship of information dissemination from the initial publisher to the farthest disseminator; node breadth represents the number of information disseminated by each node to its directly associated users, reflecting the dissemination coverage of the node; and the dissemination path describes the complete dissemination link of information from the source user node to each target user node. Through the information cascade tree, the scope, depth and intensity of information dissemination can be intuitively analyzed, and high-influence users or key dissemination nodes can be identified, thereby optimizing dissemination strategies or predicting information diffusion trends.

[0176] In a specific implementation, first, it is necessary to calculate the social influence index between users. The first step is to calculate the similarity between user nodes based on user node representation vectors, such as user attributes, behaviors, and content embedding vectors. Cosine similarity or other suitable similarity metrics can be used. Based on the calculated similarity matrix, a first weighted adjacency matrix is ​​constructed, and the elements in the matrix represent the similarity values ​​between users. Next, the eigenvector centrality of each user node in the first weighted adjacency matrix is ​​calculated as the first influence indicator. The eigenvector centrality can reflect the importance of the user in the network.

[0177] The second step is to obtain the historical interaction records of the user node, such as likes, comments, and reposts. In order to reflect the importance of recent interactions, a time decay function is constructed, such as an exponential decay function or a Gaussian decay function. The time decay function is applied to the number of interactions in the historical interaction records to obtain the weighted interaction frequency. For example, suppose user A and user B interacted 3 times 1 day ago and 1 time 7 days ago. The time decay function is exp(-t / 7), where t is the time interval (days). Then the weighted interaction frequency is 3×exp(-1 / 7)+1×exp(-7 / 7). Divide the weighted interaction frequency by the preset time window length, such as 7 days, to obtain the second influence indicator.

[0178] The third step is to obtain the content propagation record of the user node and build an information cascade tree based on the content propagation record. The information cascade tree records the propagation path of the content published by the user node. For example, user A publishes the content, user B forwards it, and user C forwards it again, thus forming a propagation path of A→B→C. Calculate the hierarchical depth value of the information cascade tree, for example, the hierarchical depth of A→B→C is 3. At the same time, calculate the node breadth value. For example, if B also forwards it to D and E, the node breadth of B is 3. Calculate the third influence indicator based on the hierarchical depth value and the node breadth value, for example, weighted sum of the depth value and breadth value.

[0179] Finally, the first influence indicator, the second influence indicator, and the third influence indicator are weighted and combined to generate the final social influence indicator. For example, different weights can be assigned according to the importance of different indicators, and then linearly combined.

[0180] Next, calculate the relationship strength index between users. Get the number of common friends between user nodes. Get the interaction time series between user nodes, such as the number of interactions between user A and user B per day in the past 7 days. Calculate the distribution overlap of the interaction time series, such as using KL divergence or other distribution similarity measurement methods. Get the interest tags of user nodes, such as "sports", "music", "movies", etc. Calculate the cosine similarity of interest tags. Get direct interaction data between user nodes, such as private messages, comments, etc. Combine the number of common friends, distribution overlap, cosine similarity, and direct interaction data to form a relationship strength vector.

[0181] Construct an empty affinity matrix. For any two directly connected user nodes, perform a weighted combination of the social influence index and the relationship strength vector of the two user nodes as the affinity value of the corresponding position in the affinity matrix. For any two user nodes that are not directly connected, based on the multi-hop path between the two user nodes, such as A→B→C, calculate the attenuated propagation value of the social influence index and the relationship strength vector on the path as the affinity value of the corresponding position in the affinity matrix. The attenuated propagation value can be decayed according to the path length, such as exponential decay. Repeat the calculation until the complete affinity matrix is ​​filled.

[0182] Calculate the degree matrix of the affinity matrix. The degree matrix is ​​a diagonal matrix. The elements on the diagonal are the sum of the elements of the row (or column) of the corresponding node in the affinity matrix. Calculate the Laplace matrix based on the affinity matrix and the degree matrix. The Laplace matrix is ​​equal to the degree matrix minus the affinity matrix. Calculate the eigenvalues ​​and corresponding eigenvectors of the Laplace matrix. According to the preset number, such as the preset number of clusters, select the eigenvector corresponding to the smallest non-zero eigenvalue of the corresponding number to construct the feature matrix. Perform clustering operations such as K-means on the row vectors of the feature matrix to obtain the initial social circle structure.

[0183] Case: Users A, B, and C are directly connected. The similarity between A and B is 0.8, the similarity between A and C is 0.5, and the similarity between B and C is 0.7. The eigenvector centralities of A, B, and C are 0.6, 0.8, and 0.5, respectively. The number of common friends between A and B is 5, the overlap of the interaction time series is 0.9, the similarity of interest tags is 0.8, and the direct interaction data is 10. The number of common friends between A and C is 2, the overlap of the interaction time series is 0.5, the similarity of interest tags is 0.6, and the direct interaction data is 3. The number of common friends between B and C is 3, the overlap of the interaction time series is 0.7, the similarity of interest tags is 0.7, and the direct interaction data is 5. After calculation, the affinity matrix is ​​obtained, and then the degree matrix and Laplace matrix are calculated, and finally the initial social circle structure is obtained through spectral clustering.

[0184] In this embodiment, the social influence and relationship strength of users are comprehensively considered, which can more comprehensively characterize the relationship between users, thereby improving the accuracy of social circle identification; the spectral clustering algorithm has strong adaptability to data distribution and can effectively process complex network structures, thereby enhancing the stability of the social circle structure; it can clearly show the influence and relationship strength between users, improve the interpretability of the social circle structure, and help understand the mechanism of circle formation.

[0185] In an optional implementation, performing causal intervention analysis to verify the stability of the initial social circle structure and determining the final social circle structure includes:

[0186] Based on the user node representation vector, a node causal relationship graph is constructed, the causal correlation strength of the data in the node causal relationship graph to the initial social circle structure is calculated, and a set of variables to be verified is generated;

[0187] For each variable to be verified in the set of variables to be verified, an intervention operation is performed:

[0188] According to a preset intervention ratio, a target user node is randomly selected from all user nodes; the value of the variable to be verified corresponding to the target user node is changed to a preset intervention value; based on the changed variable to be verified, the social influence score of the target user node is recalculated, and based on the social influence score, the relationship strength score of the target user node is recalculated;

[0189] Based on the updated social influence score and relationship strength score of the target user node, the circles are re-divided to obtain the intervention circle structure, and the member overlap rate between the intervention circle structure and the initial social circle structure is calculated; the number deviation value between the number of intervention circles in the intervention circle structure and the number of initial circles in the initial social circle structure is calculated; the boundary fuzziness between adjacent circles in the intervention circle structure is calculated;

[0190] For each variable to be verified in the set of variables to be verified, the intervention operation is repeatedly performed according to a preset number of interventions to obtain overlapping rates, quantity deviation values, and boundary fuzziness of multiple groups of members; the corresponding means and variances are calculated to obtain distribution feature data;

[0191] Based on the causal association strength and the distribution characteristic data, identifying the influencing variables corresponding to the initial social circle structure; for the influencing variables, calculating the stability threshold based on the distribution characteristic data;

[0192] When the change amplitude of the influencing variable is less than the stability threshold, the initial social circle structure is adjusted to obtain the final social circle structure.

[0193] In a specific implementation, first, user data is collected, including user behavior data, attribute data, and relationship data. The collected user data is preprocessed, such as data cleaning, missing value filling, etc. Then, a deep learning model, such as a graph neural network, is used to learn the user's node representation vector. This vector can capture the user's characteristics and relationship information. For example, the GraphSAGE model can be used to input the user relationship network and user attribute features, and output a low-dimensional vector representation of each user. Assume that there are 1,000 users and the vector dimension of each user is 128.

[0194] Next, based on the user node representation vector, the community discovery algorithm is used to divide the user into circles to obtain the initial social circle structure. For example, the Louvain algorithm can be used for community discovery. Assume that the initial division result is three circles, including 300, 500 and 200 users respectively.

[0195] Based on the user node representation vector, a node causal relationship graph is constructed. The node causal relationship graph can reflect the potential causal influence relationship between users. For example, the similarity of the vector representation between users can be calculated, and a threshold can be set to connect two users with a similarity higher than the threshold to form a directed edge, and the direction of the edge represents the potential causal influence direction.

[0196] Then, the causal strength of the data in the node causal relationship graph to the initial social circle structure is calculated. For example, the in-degree and out-degree of each node, as well as the circle information of the nodes connected by these edges, can be counted to measure the influence of the node on the circle structure. Assuming that the out-degree of node A is 10, of which 8 edges are connected to nodes in the same circle and 2 edges are connected to nodes in other circles, the causal strength of node A to the current circle structure is relatively high.

[0197] Perform intervention operations on the set of variables to be verified, such as the user's age, hobbies, activity, etc. Assume that the user's activity is selected as the variable to be verified.

[0198] According to the preset intervention ratio, for example, 10%, the target user node is randomly selected from all user nodes. Assume that 100 users are randomly selected as target users from 1,000 users.

[0199] Change the value of the variable to be verified corresponding to the target user node to the preset intervention value. For example, double the activity of the target user.

[0200] Based on the changed variables to be verified, the social influence score and relationship strength score of the target user node are recalculated. For example, the social influence score can be recalculated based on indicators such as the user's activity, number of followers, and number of interactions. The relationship strength score can also be recalculated based on indicators such as the frequency of interaction between users and the number of common friends.

[0201] Based on the updated social influence scores and relationship strength scores, the circles are re-divided to obtain the intervention circle structure. For example, the Louvain algorithm is used again for community discovery.

[0202] Calculate the member overlap rate, quantity deviation value and boundary fuzziness between the intervention circle structure and the initial social circle structure. The member overlap rate refers to the proportion of the same members in the two circle structures. The quantity deviation value refers to the difference between the number of intervention circles and the number of initial circles. The boundary fuzziness can be calculated based on the tightness of the node connection between the circles.

[0203] Repeat the intervention operation, for example, perform intervention 10 times, and obtain the overlap rate, quantity deviation value and boundary fuzziness of multiple groups of members. Calculate the corresponding mean and variance to obtain distribution feature data.

[0204] Based on the causal association strength and distribution characteristic data, identify the influencing variables corresponding to the initial social circle structure. For example, if the circle structure changes significantly after intervening in a certain variable, then this variable is an influencing variable.

[0205] For the influencing variables, a stability threshold is calculated based on the distribution characteristic data. For example, the threshold can be set according to the variance of the distribution characteristic data.

[0206] When the change range of the influencing variables is less than the stability threshold, the initial social circle structure is considered stable. Otherwise, the initial social circle structure is adjusted according to the change of the influencing variables to obtain the final social circle structure. For example, the circle boundaries can be re-divided according to the value range of the influencing variables.

[0207] In this embodiment, through causal intervention analysis, the key variables that affect the circle structure are identified and controlled, thereby improving the accuracy and stability of circle division and more truly reflecting the relationship between users; through the setting of stability thresholds, the circle structure fluctuations caused by noise or abnormal data can be effectively avoided, making the circle structure more stable and reliable; through the analysis of influencing variables, the impact mechanism of different variables on the circle structure can be deeply understood, providing a basis for more refined circle analysis and personalized recommendations.

[0208] Figure 2 Schematic diagram of the structure of a private domain social relationship mining system based on a graph neural network according to an embodiment of the present invention. Figure 2 As shown, the system comprises:

[0209] The first unit is used to obtain historical behavior data of multiple users in the target private domain platform; use the knowledge graph technology to align the historical behavior data with the external domain knowledge base for entity and relationship mapping to generate user behavior feature data; construct a node feature matrix based on the user behavior feature data; use a time-series-aware dynamic encoder to process the user interaction sequence in the user behavior feature data to generate a dynamic edge feature matrix; fuse the node feature matrix and the dynamic edge feature matrix to construct a private domain user relationship graph;

[0210] The second unit is used to disperse and store the user data of the private domain user relationship graph to multiple local computing nodes, respectively construct a federated graph neural network model including a spatiotemporal attention layer on the multiple local computing nodes, and adopt a secure aggregation protocol to integrate the processing results of the multiple local computing nodes to obtain a user node representation vector;

[0211] The third unit is used to calculate the social influence index and the relationship strength index between users according to the user node representation vector, and use the spectral clustering method to perform cluster analysis on the social influence index and the relationship strength index to obtain the initial social circle structure; perform causal intervention analysis to verify the stability of the initial social circle structure and determine the final social circle structure; generate a social relationship analysis report based on the final social circle structure, social influence index and relationship strength index.

[0212] According to a third aspect of the embodiments of the present invention,

[0213] An electronic device is provided, comprising:

[0214] processor;

[0215] a memory for storing processor-executable instructions;

[0216] The processor is configured to call the instructions stored in the memory to execute the aforementioned method.

[0217] According to a fourth aspect of the embodiments of the present invention,

[0218] A computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the aforementioned method is implemented.

[0219] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.

[0220] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A private domain social relationship mining method based on graph neural network, characterized in that: include: Obtain historical behavior data of multiple users on the target private domain platform; Using knowledge graph technology to perform entity alignment and relationship mapping between the historical behavior data and the external domain knowledge base to generate user behavior feature data; constructing a node feature matrix based on the user behavior feature data; Using a time-series-aware dynamic encoder to process the user interaction sequence in the user behavior feature data to generate a dynamic edge feature matrix; The node feature matrix and the dynamic edge feature matrix are integrated to construct a private domain user relationship graph; The user data of the private domain user relationship graph is dispersedly stored in multiple local computing nodes, a federated graph neural network model including a spatiotemporal attention layer is respectively constructed on the multiple local computing nodes, and a secure aggregation protocol is adopted to integrate the processing results of the multiple local computing nodes to obtain a user node representation vector; Calculating the social influence index and the relationship strength index between users according to the user node representation vector, and performing cluster analysis on the social influence index and the relationship strength index using a spectral clustering method to obtain an initial social circle structure; Performing causal intervention analysis to verify the stability of the initial social circle structure and determine the final social circle structure; Generate a social relationship analysis report based on the final social circle structure, social influence indicators and relationship strength indicators.

2. The method according to claim 1, characterized in that The time-series-aware dynamic encoder is used to process the user interaction sequence in the user behavior feature data to generate a dynamic edge feature matrix including: The historical behavior data includes user identification, interaction type, interaction timestamp and interaction object; Constructing a user interaction sequence according to the interaction timestamps in the historical behavior data, wherein the user interaction sequence records the interaction records between the user and the interaction object in chronological order; dividing the user interaction sequence into a plurality of interaction subsequences according to a preset time window; calculating the occurrence frequency and transition probability of the interaction objects in the interaction subsequences to generate a sequence feature vector; Using a bidirectional long short-term memory conditional random field model to identify entity mentions from the historical behavior data; combining the sequence feature vector with the semantic features of the entity mention to generate entity matching features; calculating the matching degree with the candidate entity in the external domain knowledge base based on the entity matching features; and selecting the candidate entity with the highest matching degree as the link entity; Execute a label propagation algorithm on the linked entities to obtain entity community division results; determine a sampling probability distribution according to the structural closeness between entities in the entity community division results; obtain neighbor entities within a preset hop count range in the external domain knowledge base based on the sampling probability distribution to form a local knowledge subgraph, and decompose the relationship path between entities in the local knowledge subgraph into multiple time-dependent subpaths; A timing-aware dynamic encoder including an interaction sequence encoding layer and a dynamic feature fusion layer is constructed, and the user interaction sequence and the timing-dependent subpath are input into the timing-aware dynamic encoder; the timing dependency of the interaction sequence is extracted in the interaction sequence encoding layer; the timing dependency, the node feature matrix and the timing-dependent subpath are integrated in the dynamic feature fusion layer; and a dynamic edge feature matrix is ​​generated.

3. The method according to claim 2, characterized in that Executing a label propagation algorithm on the link entity to obtain an entity community division result includes: Counting the number of connections between each linked entity and other linked entities to obtain a node connection number statistical value, and calculating the node degree centrality of each linked entity according to the node connection number statistical value; sorting the linked entities in descending order based on the node degree centrality to generate a node influence sequence; Based on the node influence sequence, determine the number, set the number as the initial label value of the link entity, and generate an initial label sequence; determine the adjacent entity set of each link entity according to the connection relationship between the link entities; combine the label values ​​of each entity in the adjacent entity set into a label update candidate set; According to the order of the node influence sequence from large to small, a label update operation is performed on each of the link entities: Count the number of occurrences of each label value in the label update candidate set corresponding to the current link entity to generate a label frequency sequence; select the label value with the largest number of occurrences from the label frequency sequence as the target label value; when there are multiple label values ​​with the largest number of occurrences in the label frequency sequence, select the label value with the smallest value as the target label value; update the target label value to the label value of the current link entity; Divide the linked entities with the same label value into the same community to obtain the community division result of the current round; Calculate the number of entities in the same community in the community division results of the current round and the community division results of the previous round to generate a community overlap; divide the community overlap by the total number of linked entities to obtain a community stability coefficient; Repeat the iteration until the community stability coefficient is greater than a preset stability threshold, determine the community division result corresponding to the current round as the final result, and obtain the entity community division result.

4. The method according to claim 2, characterized in that: The dynamic edge feature matrix also includes: Separating the dynamic edge feature matrix into a structural feature sub-matrix, a semantic feature sub-matrix and a temporal feature sub-matrix; Performing feature decomposition operations on the structural feature submatrix, the semantic feature submatrix, and the temporal feature submatrix, respectively, to obtain main feature components; calculating the probability distribution of non-zero elements in the main feature components, and calculating information entropy scores based on the probability distribution; Constructing a multi-head attention network, the multi-head attention network comprises a query transformation layer, a key transformation layer and a value transformation layer; inputting the structural feature submatrix, the semantic feature submatrix and the temporal feature submatrix into the query transformation layer, the key transformation layer and the value transformation layer respectively to obtain a query matrix, a key matrix and a value matrix; performing a matrix multiplication operation on the query matrix and the key matrix to obtain an attention score matrix; performing a normalization process on the attention score matrix and performing a matrix multiplication operation with the value matrix to obtain a channel feature representation; Constructing a feature fusion gating network, wherein the feature fusion gating network includes an update gate and a reset gate; inputting the channel feature representation into the feature fusion gating network, calculating the importance weight of each channel feature through the update gate, controlling the transmission of feature information through the reset gate, performing weighted combination of the channel feature representation based on the importance weight, and generating a fusion feature matrix; Compare the information entropy score with a preset information entropy threshold, select a feature dimension corresponding to a value greater than the information entropy threshold, perform a dimensionality reduction operation on the fused feature matrix based on the feature dimension, retain the corresponding feature information, and determine a reduced-dimensional feature matrix; A matrix addition operation is performed on the dynamic edge feature matrix and the dimension reduction feature matrix to obtain a residual feature matrix; and the residual feature matrix is ​​normalized to obtain an optimized dynamic edge feature matrix.

5. The method according to claim 1, characterized in that The user data of the private domain user relationship graph is dispersedly stored in multiple local computing nodes, and a federated graph neural network model including a spatiotemporal attention layer is respectively constructed on the multiple local computing nodes. The processing results of multiple local computing nodes are integrated using a secure aggregation protocol to obtain a user node representation vector including: Obtain historical geographic location information of user nodes in a private domain user relationship graph; calculate the geographic activity center coordinates of each user node according to the historical geographic location information; perform clustering operations on the geographic activity center coordinates to divide the user nodes into multiple local computing nodes; for the connection relationship between user nodes connected to different local computing nodes, copy the information of the connection relationship to the associated local computing nodes; form subgraph data with the user nodes and corresponding connection relationships of each local computing node; Constructing a graph neural network model at each local computing node, the graph neural network model comprising a time attention layer, a spatial attention layer and a graph convolution layer; based on the behavior timestamp, behavior duration and behavior type of the user node in the subgraph data, calculating the behavior temporal importance score through the time attention layer to generate a time attention feature; based on the geographic distance relationship between the user nodes in the subgraph data, calculating the spatial correlation score through the spatial attention layer to generate a spatial attention feature; Fusing the temporal attention feature and the spatial attention feature with the user node feature in the subgraph data, inputting the result into the graph convolution layer, and generating a user node fusion representation of the local computing node; Generate an encryption public key and a decryption private key corresponding to the security aggregation, distribute the encryption public key to each local computing node, generate a random noise matrix at each local computing node, add the user node fusion representation to the random noise matrix to obtain a noise mask representation, and use the encryption public key to encrypt the noise mask representation to obtain a local encrypted representation; Perform homomorphic encryption operations on the local encrypted representations corresponding to all local computing nodes to obtain an encrypted aggregate representation, and use a decryption private key to decrypt the encrypted aggregate representation to obtain a noisy aggregate representation; A secure communication channel is established between local computing nodes, and random noise matrices are exchanged; all random noise matrices are superimposed to obtain an overall noise matrix, and the overall noise matrix is ​​removed from the noisy aggregate representation to obtain a final user node representation vector.

6. The method according to claim 1, characterized in that The social influence index and the relationship strength index between users are calculated according to the user node representation vector, and the social influence index and the relationship strength index are clustered and analyzed by the spectral clustering method to obtain the initial social circle structure including: Calculating a similarity matrix between user nodes based on user node representation vectors, and constructing a first weighted adjacency matrix based on the similarity matrix; calculating the eigenvector centrality of each user node in the first weighted adjacency matrix to obtain a first influence index; Obtain historical interaction records of the user node, construct a time decay function, apply the time decay function to the number of interactions in the historical interaction records to obtain a weighted interaction frequency, and divide the weighted interaction frequency by a preset time window length to obtain a second influence indicator; Obtaining the content propagation record of the user node, constructing an information cascade tree based on the content propagation record, wherein the information cascade tree includes the propagation path of the content published by the user node; calculating the level depth value and the node breadth value of the information cascade tree; calculating a third influence indicator based on the level depth value and the node breadth value; Performing a weighted combination of the first influence indicator, the second influence indicator, and the third influence indicator to generate a social influence indicator; Obtain the number of common friends between user nodes, and obtain the interaction time series between user nodes; calculate the distribution overlap of the interaction time series; obtain the interest tags of user nodes; calculate the cosine similarity of the interest tags; obtain the direct interaction data between user nodes; combine the number of common friends, the distribution overlap, the cosine similarity and the direct interaction data to form a relationship strength vector; Construct an empty affinity matrix, wherein for any two directly connected user nodes, the social influence index and the relationship strength vector of the two user nodes are weightedly combined as the affinity value of the corresponding position in the affinity matrix; for any two user nodes that are not directly connected, based on the multi-hop path between the two user nodes, the attenuated propagation value of the social influence index and the relationship strength vector on the path is calculated as the affinity value of the corresponding position in the affinity matrix; the calculation is repeated until the complete affinity matrix is ​​filled; Calculate the degree matrix of the affinity matrix, calculate the Laplace matrix based on the affinity matrix and the degree matrix, calculate the eigenvalues ​​and corresponding eigenvectors of the Laplace matrix, select the eigenvectors corresponding to the smallest number of non-zero eigenvalues ​​according to a preset number, construct a feature matrix, perform clustering operations on the row vectors of the feature matrix, and obtain an initial social circle structure.

7. The method according to claim 6, characterized in that Performing causal intervention analysis to verify the stability of the initial social circle structure and determine the final social circle structure includes: Based on the user node representation vector, a node causal relationship graph is constructed, the causal correlation strength of the data in the node causal relationship graph to the initial social circle structure is calculated, and a set of variables to be verified is generated; For each variable to be verified in the set of variables to be verified, an intervention operation is performed: According to a preset intervention ratio, a target user node is randomly selected from all user nodes; the value of the variable to be verified corresponding to the target user node is changed to a preset intervention value; based on the changed variable to be verified, the social influence score of the target user node is recalculated, and based on the social influence score, the relationship strength score of the target user node is recalculated; Based on the updated social influence score and relationship strength score of the target user node, the circles are re-divided to obtain the intervention circle structure, and the member overlap rate between the intervention circle structure and the initial social circle structure is calculated; the number deviation value between the number of intervention circles in the intervention circle structure and the number of initial circles in the initial social circle structure is calculated; the boundary fuzziness between adjacent circles in the intervention circle structure is calculated; For each variable to be verified in the set of variables to be verified, the intervention operation is repeatedly performed according to a preset number of interventions to obtain overlapping rates, quantity deviation values, and boundary fuzziness of multiple groups of members; the corresponding means and variances are calculated to obtain distribution feature data; Based on the causal association strength and the distribution characteristic data, identifying the influencing variables corresponding to the initial social circle structure; for the influencing variables, calculating the stability threshold based on the distribution characteristic data; When the change amplitude of the influencing variable is less than the stability threshold, the initial social circle structure is adjusted to obtain the final social circle structure.

8. A private domain social relationship mining system based on graph neural network, used to implement the method described in any one of claims 1 to 7, characterized in that: include: The first unit is used to obtain historical behavior data of multiple users in the target private domain platform; Using knowledge graph technology to perform entity alignment and relationship mapping between the historical behavior data and the external domain knowledge base to generate user behavior feature data; constructing a node feature matrix based on the user behavior feature data; Using a time-series-aware dynamic encoder to process the user interaction sequence in the user behavior feature data to generate a dynamic edge feature matrix; The node feature matrix and the dynamic edge feature matrix are integrated to construct a private domain user relationship graph; The second unit is used to disperse and store the user data of the private domain user relationship graph to multiple local computing nodes, respectively construct a federated graph neural network model including a spatiotemporal attention layer on the multiple local computing nodes, and adopt a secure aggregation protocol to integrate the processing results of the multiple local computing nodes to obtain a user node representation vector; The third unit is used to calculate the social influence index and the relationship strength index between users according to the user node representation vector, and perform cluster analysis on the social influence index and the relationship strength index by using a spectral clustering method to obtain an initial social circle structure; Performing causal intervention analysis to verify the stability of the initial social circle structure and determine the final social circle structure; Generate a social relationship analysis report based on the final social circle structure, social influence indicators and relationship strength indicators.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to call the instructions stored in the memory to execute the method described in any one of claims 1 to 7.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method and device for predicting relationship between users in dynamic social network with efficient parameters

    CN116523123A

  • Social network friend close circle division method based on user behaviors

    CN117407600A