WO2021184367A1 - 基于度分布生成模型的社交网络图生成方法 - Google Patents

基于度分布生成模型的社交网络图生成方法 Download PDF

Info

Publication number
WO2021184367A1
WO2021184367A1 PCT/CN2020/080472 CN2020080472W WO2021184367A1 WO 2021184367 A1 WO2021184367 A1 WO 2021184367A1 CN 2020080472 W CN2020080472 W CN 2020080472W WO 2021184367 A1 WO2021184367 A1 WO 2021184367A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
degree
nodes
social network
distribution
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2020/080472
Other languages
English (en)
French (fr)
Inventor
王朝坤
王彬彬
黄冰洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN202080005625.0A priority Critical patent/CN114207573A/zh
Priority to PCT/CN2020/080472 priority patent/WO2021184367A1/zh
Priority to US17/784,175 priority patent/US12045285B2/en
Publication of WO2021184367A1 publication Critical patent/WO2021184367A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/40Business processes related to social networking or social networking services
    • G06Q10/48Business processes related to social networking or social networking services using social graphs
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/211Schema design and management
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs

Definitions

  • the present disclosure relates to the field of computer technology, and in particular to a method for generating a social network graph based on a degree distribution generation model.
  • the social network graph generator aims to generate graph data as similar to real social networks as possible.
  • many social network analysis tasks have emerged in recent years, such as community discovery, community search, and network representation learning.
  • both real network data and synthetic data are necessary. Therefore, the social network graph generator becomes more and more important, especially considering that different algorithms focus on different characteristics of the network graph.
  • community discovery algorithms that use hierarchical clustering or matrix block technology deal with isomorphic graphs, that is, there is only one type of node and edge in the network graph; while some community discovery algorithms deal with heterogeneous graphs, where there are nodes with multiple labels in the graph. And many types of edges.
  • communities in real networks can be divided into overlapping communities and non-overlapping communities, and the graph data generated by many social applications has grown exponentially.
  • the mode-driven method enables the generator to have a wide range of application scenarios and generate graph data for different applications.
  • This type of method generates data based on well-designed patterns. Users can specify common features of the composite graph in the pattern information, such as node labels and edge labels.
  • this type of method is not specifically designed for social network graphs, does not support the inclusion of community structure in composite graphs, and is inefficient, and is not suitable for generating large-scale graph data.
  • LFR is a widely used tool for generating social network graphs.
  • a community is constructed based on the ratio of the edge between a node and a node in the same community to the total degree of the node.
  • the in-degree distribution of nodes conforms to the power-law distribution, while the out-degree distribution of nodes does not conform to the power-law distribution.
  • LFR has a high computational overhead when building communities, so it is not suitable for generating large-scale graph data.
  • R-MAT uses a recursive matrix model to recursively select a quadrant of the adjacency matrix until a cell is selected, thereby generating an edge.
  • Kronecker has two models: Stochastic Kronecker Graph (SKG) and Deterministic Kronecker Graph (DKG).
  • SKG Stochastic Kronecker Graph
  • DKG Deterministic Kronecker Graph
  • the widely used SKG model is a generalized model of the recursive matrix model on the number of probability parameters. .
  • the space complexity of R-MAT is O(
  • TrillionG proposes a new recursive vector model to overcome the high temporal and spatial complexity of these two models, and can efficiently generate trillions of graphs.
  • the graph generated by TrillionG does not have a community structure.
  • the present disclosure proposes a method for generating a social network graph based on a degree distribution generation model.
  • a method for generating a social network graph based on a degree distribution generation model including:
  • the out degree of a source node and multiple target node IDs are randomly generated, so that the out degree and in degree distributions of the source node and the target node conform to the expected distribution;
  • the graph data is generated in a stream.
  • the newly added number of source nodes and target nodes are obtained, and the graph data is generated by a simple graph generation method.
  • the setting the pattern information used for the generation of the social network graph, and generating network graph data according to the pattern information generated by the social network graph includes:
  • Set node mode information set edge mode information, set community mode information, set social network graph mode information, and set symbolic representation for generating social network graphs
  • the setting is used for the generated social network graph, and its symbolic representation includes:
  • a node v ⁇ V is a triple (ID, lbl, attr), where lbl is the node label, attr is the node attribute, and ID is the unique identifier of a node;
  • An edge e ⁇ E is a four-tuple (v s , v t , lbl, attr), v s and v t are the IDs of the source and destination nodes of an edge, lbl is the label of the edge, and attr is the edge
  • v s , v t and lbl uniquely determine an edge.
  • the community separation parameter ⁇ is a real number in the range of [0,1], and the greater the value of ⁇ , The greater the number of edges between communities.
  • the degree distribution generation model is set, and the degree distribution generation model is used to randomly generate the output degree of a source node and multiple target node IDs. , So that the out-degree and in-degree distributions of the source node and the target node conform to the expected distribution including:
  • the out-degree satisfying the distr out distribution is calculated for a source node as follows:
  • outd min and outd max are the minimum out-degree and maximum out-degree of the source node provided in the mode information, respectively, and ⁇ out is the parameter of the node out-degree distribution distr out;
  • the adjustment of the maximum node outd max such that n 'e and n e in line comprising:
  • the method further includes:
  • a target node ID that conforms to the expected node in-degree distribution is obtained;
  • H 1 (z) F s (argmax x F s (x) ⁇ z)
  • H 2 (z) F s ( argmin x F s (x) ⁇ z)
  • x is the node In-degree, z ⁇ i ⁇ step
  • the target node ID is:
  • the obtaining the number of source nodes and target nodes and the degree distribution parameters, and generating a simple graph of the social network graph based on the degree distribution generation model includes:
  • the social network graph is generated based on the degree distribution generation model, and the community size is determined. For graphs in the same community and graphs in different communities , Get the number of source nodes and target nodes of each part separately, generate a simple graph and merge it into a social network graph including:
  • is the normalization parameter
  • is the community separation parameter
  • value range is a real number between [0,1]
  • outd max is the maximum out degree of the source node
  • p(x) is a monotonically decreasing function
  • n e For each edge pattern ES in the social network pattern information S, find the relevant source node pattern VS s , the target node pattern VS t , and the community pattern CS in the social network pattern information S, and the number of edges generated ES.amount is n e , the number of source nodes VS s .amount is n s , the number of target nodes VS t .amount is n t , the number of communities CS.amount is n c , CS. ⁇ s and CS. ⁇ t are two power-law distribution parameters ;
  • the community size distribution parameters CS. ⁇ s and CS. ⁇ t determine the size of the matrix representation of each community:
  • the degree distribution generation model generates graph data in a streaming manner by comparing the source node and the target node at the current moment with the previous moment. The number of source nodes and the number of target nodes that need to be newly added is obtained.
  • the graph data generated by the simple graph generation method includes:
  • the initialization variable pc lt is 0, and pc tg is r g ;
  • the present disclosure has the following advantages:
  • the social network graph generation method based on the degree distribution generation model of the present disclosure proposes a degree distribution generation model to quickly generate random numbers that conform to a specific distribution, efficiently determine the degree for each node, and determine a corresponding number of target nodes to generate Graphs, the edges of the generated graphs represent the interaction relationships of users in the network.
  • the generated graphs have the characteristics of real social networks and can be used as input data for various network analysis tasks to meet the needs of multiple application scenarios.
  • the generation method is efficient and scalable. Strong, suitable for generating large-scale graph data.
  • FIG. 1 is a flow chart of a method for generating a social network graph based on a degree distribution generation model proposed by the present disclosure.
  • the purpose of the present disclosure is to propose a social network graph generation method based on a degree distribution generation model, which uses user-defined pattern information to generate a social network graph, which can meet the needs of multiple application scenarios, and the generation method is efficient and scalable. Strong, suitable for generating large-scale graph data.
  • the nodes in the generated graph can represent users in social networks, and the edges can represent user behaviors.
  • the social network graph generation method based on the degree distribution generation model generates data on the matrix representation of the graph. For each source node, an out degree is randomly generated, and then several target node IDs are generated to generate edges.
  • D ⁇ 2G degree distribution generation model
  • the time complexity of determining the degree for a source node or generating a target node is O (1). Therefore, it is suitable to use the D ⁇ 2G model to generate large-scale graph data.
  • D ⁇ 2G is a general model. As long as the probability density function or probability mass function of the degree distribution is provided, the model can be used to generate graph data corresponding to the degree distribution.
  • FIG. 1 is a flowchart of a method for generating a social network graph based on a degree distribution generation model proposed in the present disclosure. As shown in FIG. 1, the method for generating a social network graph based on a degree distribution generation model:
  • the setting of pattern information used for social network graph generation, and generating network graph data according to the pattern information generated by the social network graph includes:
  • Set node mode information set edge mode information, set community mode information, set social network graph mode information, and set symbolic representation for generating social network graphs
  • the setting is used for the generated social network graph, and its symbolic representation includes:
  • a node v ⁇ V is a triple (ID, lbl, attr), where lbl is the node label, attr is the node attribute, and ID is the unique identifier of a node;
  • An edge e ⁇ E is a four-tuple (v s , v t , lbl, attr), v s and v t are the IDs of the source and destination nodes of an edge, lbl is the label of the edge, and attr is the edge
  • v s , v t and lbl uniquely determine an edge.
  • the attribute information of nodes and edges is optional.
  • the setting of the degree distribution generation model and the realization of a source node randomly generating the out degree and target node ID according to the degree distribution generation model so that the out degree and in degree distributions of the source node and the target node conform to the expected distribution include:
  • G(z) argmax x F(x) ⁇ z,x ⁇ [d min ,d max ];
  • the degree distribution generation model uses the GenOutDegree(distr out , n s , n e ) program.
  • the input parameters of the program are: node out-degree distribution distr out , the number of nodes n s and the number of expected edges n e , and the output is a satisfying ditr The out degree of the out distribution.
  • the out-degree satisfying the distr out distribution is calculated for a source node as follows:
  • outd min and outd max are the minimum out-degree and maximum out-degree of the source node provided in the mode information, respectively, and ⁇ out is the parameter of the node out-degree distribution distr out;
  • a target node ID that conforms to the expected node in-degree distribution is obtained;
  • a constraint condition for the relationship between the target node id and the in-degree is given. Given n t target nodes Sorted by id from small to large, the in-degree of these nodes is non-increasing. Such constraints are reasonable, because if you hope that there is no obvious relationship between the node id and the in-degree, you can randomly generate a permutation of positive integers on [1,n t ], and then map the node id to the corresponding permutation value.
  • H 1 (z) F s (argmax x F s (x) ⁇ z)
  • H 2 (z) F s ( argmin x F s (x) ⁇ z)
  • x is the node In-degree, z ⁇ i ⁇ step
  • the simple graph of obtaining the number of source nodes and target nodes and degree distribution parameters, and generating a social network graph based on the degree distribution generation model includes:
  • the generation model based on the degree distribution generates a social network graph to determine the size of the community. For graphs in the same community and graphs in different communities, the number of source nodes and target nodes in each part is obtained separately, and a simple graph is generated and then merged into a social network
  • the figure includes:
  • is the normalization parameter
  • is the community separation parameter
  • value range is a real number between [0,1]
  • outd max is the maximum out-degree of the source node
  • p(x) is a monotonically decreasing function, which means that a source node u has a smaller
  • the probability of a source node is higher, that is, the probability that the node connection between two communities is sparse is higher.
  • the larger the parameter ⁇ the larger the source node The probability is higher, that is, there are more edges between different communities;
  • n e For each edge pattern ES in the social network pattern information S, find the relevant source node pattern VS s , the target node pattern VS t , and the community pattern CS in the social network pattern information S, and the number of edges generated ES.amount is n e , the number of source nodes VS s .amount is n s , the number of target nodes VS t .amount is n t , the number of communities CS.amount is n c , CS. ⁇ s and CS. ⁇ t are two power-law distribution parameters ;
  • the community size distribution parameters CS. ⁇ s and CS. ⁇ t determine the size of the matrix representation of each community:
  • the degree distribution generation model generates graph data in a streaming manner by comparing the source node and the target node at the current moment with the previous moment. The number of source nodes and the number of target nodes that need to be newly added is obtained.
  • the graph data generated by the simple graph generation method includes:
  • the initialization variable pc lt is 0, and pc tg is r g ;
  • the method proposed in the present disclosure uses user-defined pattern information to generate a social network graph, which can meet the needs of a variety of application scenarios.
  • the generated graph node can represent Users in the actual network; the edges of the generated graph can represent the interaction relationship of users in the network, such as the following relationship between users, private letter behavior, etc.
  • the generated graph has the characteristics of a real social network, including small world, community structure and power law distribution, and can be used as input data for various network analysis tasks, such as community discovery, community search, and network representation learning.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Economics (AREA)
  • Human Resources & Organizations (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Strategic Management (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

一种基于度分布生成模型的社交网络图生成方法,包括:设置用于社交网络图生成的模式信息,根据社交网络图生成的模式信息生成网络图数据;设置度分布生成模型,根据度分布生成模型实现随机生成一个源节点的出度和多个目标节点ID,使得源节点、目标节点的出度和入度分布符合预期分布;基于度分布生成模型生成社交网络图的简单图;基于度分布生成模型生成社交网络图;基于度分布生成模型以流式生成图数据。上述方法可以高效地为每个节点确定出度,并确定相应数量的目标节点,生成的图节点可以表示实际网络中的用户,生成图的边可以表示网络中用户的交互关系,生成的图具有真实社交网络的特点,能够作为各种网络分析任务的输入数据。

Description

基于度分布生成模型的社交网络图生成方法 技术领域
本公开涉及计算机技术领域,尤其涉及一种基于度分布生成模型的社交网络图生成方法。
背景技术
社交网络图生成器旨在生成尽可能类似于真实社交网络的图数据。随着许多社交网络平台的普及,近年来,涌现了许多社交网络分析任务,如社区发现,社区搜索和网络表示学习。为了评估这些社交网络分析任务的算法的性能和可扩展性,真实网络数据和合成数据都是必要的。因此,社交网络图生成器变得越来越重要,特别是考虑到不同的算法关注于网络图的不同特征。
例如,使用层次聚类或矩阵分块技术的社区发现算法处理同构图,即网络图中只有一种类型的节点和边;而一些社区发现算法处理异构图,图中有多种标签的节点和多种类型的边。此外,真实网络中的社区可以分为重叠社区和非重叠社区,许多社交应用产生的图数据呈指数增长。
然而,现有的图数据生成器不能满足以上所有要求。模式驱动的方法能够使生成器有广泛应用场景,为不同的应用生成图数据。这类方法根据设计良好的模式生成数据,用户可以在模式信息中指定合成图的常见特征,例如节点标签和边的标签等。然而,这类方法不是专门为社交网络图设计的,不支持在合成图中包含社区结构,而且效率低,不适合生成大规模图数据。
LFR是一种广泛使用的用于生成社交网络图的工具,根据节点与同一社区中节点之间的边与该节点的总度数的比例构建社区。节点入度分布符合幂律分布,而节点出度并不符合幂律分布。此外,LFR在构建社区时的计算开销很高,因此不适合生成大规模图数据。
目前,已提出了一些用来生成大规模图数据的方法。其中应用最广泛的是R-MAT和Kronecker。R-MAT模型使用递归矩阵模型递归地选择邻接矩阵的一个象限,直到选择一个单元格,从而生成一条边。Kronecker有随机Kronecker图(Stochastic Kronecker Graph,记为SKG)和确定的Kronecker图(Deterministic Kronecker Graph,记为DKG)两种模型,广泛应用的SKG模型是递归矩阵模型关于概率参数数量上的一个广义模型。R-MAT的空间复杂度是O(|E|),Kronecker的时间复杂度为O(|V| 2)。TrillionG提出了一种新的递归向量模型用于克服这两个模型很高的时空复杂度,可以高效生成万亿规模的图。然而, TrillionG生成的图没有社区结构,此外,如何设置噪声参数使得节点度数符合幂律分布并不明确。
因此,现有技术需要改进。
上述背景技术内容仅用于帮助理解本公开,而并不代表承认或认可所提及的任何内容属于相对于本公开的公知常识的一部分。
发明内容
为解决上述技术问题,本公开提出了一种基于度分布生成模型的社交网络图生成方法。
基于本公开实施例的一个方面,公开一种基于度分布生成模型的社交网络图生成方法,包括:
设置用于社交网络图生成的模式信息,根据社交网络图生成的模式信息生成网络图数据;
设置度分布生成模型,根据度分布生成模型实现随机生成一个源节点的出度和多个目标节点ID,使得源节点、目标节点的出度和入度分布符合预期分布;
获取源节点和目标节点数量及度分布参数,基于度分布生成模型生成社交网络图的简单图;
基于度分布生成模型生成社交网络图,确定社区大小,对于同一社区中的图和不同社区中的图,分别获取每一部分的源节点和目标节点数量,生成简单图后合并为一个社交网络图;
基于度分布生成模型以流式生成图数据,通过比较当前时刻与上一时刻的源节点和目标节点数量,得到新增加的源节点和目标节点数量,通过简单图的生成方式生成图数据。
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,所述设置用于社交网络图生成的模式信息,根据社交网络图生成的模式信息生成网络图数据包括:
设置节点模式信息、设置边模式信息、设置社区模式信息、设置社交网络图模式信息、设置用于生成社交网络图的符号表示;
所述节点模式信息包括:VS=(lbl,amount,attr),其中lbl是节点标签,amount是标签为lbl的节点数量,attr是节点属性信息,是一个key-value结构的字典,key为属性名,value为属性取值;
所述边模式信息包括:ES=(lbl,lbl s,lbl t,amount,distr in,distr out,attr),其中lbl是边的标签信息,lbl s和lbl t分别为源节点和目标节点的标签,amount为预期生成的边的数量, distr in和distr out分别为目标节点的入度分布和源节点的出度分布,attr为边的属性信息,同样是一个key-value结构的字典;
所述社区模式信息包括:CS=(lbl e,amount,λ st,ρ),表示在标签为lbl e的边构成的图上构建社区,amount为生成的社区数量,社区大小服从幂律分布,λ s和λ t分别为所有社区中源节点和目标节点数量服从幂律分布的参数,ρ为社区分离参数;
所述社交网络图模式信息包括:SGS=(VSS,ESS,CSS),其中VSS为节点模式的集合,ESS为边的模式集合,CSS为社区模式的集合;
所述设置用于生成的社交网络图,其符号表示包括:
设置有向异构图G=(V,E),其中V为节点集合,
Figure PCTCN2020080472-appb-000001
为边集;
一个节点v∈V为一个三元组(ID,lbl,attr),其中lbl为节点标签,attr为节点属性,ID为一个节点的唯一标识;
一条边e∈E以为一个四元组(v s,v t,lbl,attr),v s和v t分别为一条边的源节点和目标节点的ID,lbl为边的标签,attr为边的属性,v s、v t和lbl唯一确定一条边。
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,所述社区分离参数ρ是取值范围为[0,1]中的一个实数,ρ的取值越大,社区之间边的数量越多。
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,所述设置度分布生成模型,根据度分布生成模型实现随机生成一个源节点的出度和多个目标节点ID,使得源节点、目标节点的出度和入度分布符合预期分布包括:
计算度分布生成模型的概率质量函数:
Figure PCTCN2020080472-appb-000002
d min和d max分别为节点的最小度数和最大度数,θ为节点度数分布的参数,P(D=x;θ)为度数为x的节点的存在概率,α为归一化参数,使得所有可能的度数存在概率之和为1;
根据节点出度分布distr out、节点数量n s和预期边的数量n e,对一个源节点计算满足distr out分布的出度如下:
计算生成的边的数量:
Figure PCTCN2020080472-appb-000003
其中,outd min和outd max分别为模式信息中提供的源节点的最小出度和最大出度,θ out为节点出度分布distr out的参数;
调整节点最大出度outd max以使得n′ e与n e相符;
计算累积分布函数:
Figure PCTCN2020080472-appb-000004
其中,x∈[outd min,outd max];
计算生成一个满足累计分布函数为F(x)的随机数,y为一个服从均匀分布U(0,1)的随机数,则F -1(y)为一个源节点u生成的符合distr out分布的出度;
构造函数G(z)=argmax xF(x)≤z,x∈[outd min,outd max],其中,z∈{i·step|i∈N +,step=minP(D=x),i·step≤1};
生成一个源节点u的符合distr out分布的出度
Figure PCTCN2020080472-appb-000005
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,所述调整节点最大出度outd max以使得n′ e与n e相符包括:
如果n′ e<n e,则增大outd max,直到度数为outd max的节点数量小于1,或者n′ e≥n e
如果n′ e=n e,则不需要调整outd max
如果n′ e>n e,则减小outd max,直到n′ e≤n e
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,还包括:
对于一个确定出度的节点,生成一个符合预期分布的目标节点;
根据节点入度分布distr in,目标节点数量n t,预期边的数量n e,得到符合预期节点入度分布的一个目标节点ID;
计算节点入度和的累积分布函数:
Figure PCTCN2020080472-appb-000006
式中,x∈[ind min,ind max],β为归一化参数,
Figure PCTCN2020080472-appb-000007
构造辅助函数:H 1(z)=F s(argmax xF s(x)≤z),H 2(z)=F s(argmin xF s(x)≥z),式中,x是节点入度,z∈{i·step|i∈N +},
Figure PCTCN2020080472-appb-000008
i·step≤1;
计算两个累积分布函数值所对应的节点ID为:
Figure PCTCN2020080472-appb-000009
Figure PCTCN2020080472-appb-000010
式中,x 1=argmax xF s(x)≤z,x 2=argmin xF s(x)≥z;
目标节点ID为:
Figure PCTCN2020080472-appb-000011
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,所述获取源节点和目标节点数量及度分布参数,基于度分布生成模型生成社交网络图的简单图包括:
通过输入参数源节点数量n s、目标节点数量n t、期望生成的边数量n e、目标节点的入度分布distr in、源节点的出度分布distr out
以n s×n t的矩阵M表示一个图,以M ij=1表示存在一条从源节点v i指向目标节点v j的有向边,M ij=0表示不存在有向边,计算任一节点u的出度outd;
确定outd个不同的目标节点,构建outd条边。
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,所述基于度分布生成模型生成社交网络图,确定社区大小,对于同一社区中的图和不同社区中的图,分别获取每一部分的源节点和目标节点数量,生成简单图后合并为一个社交网络图包括:
获取社交网络模式信息S,记d out(u)为节点u的出度,
Figure PCTCN2020080472-appb-000012
为节点u与同一社区中节点相关的出度,
Figure PCTCN2020080472-appb-000013
为节点u与其他社区中节点相关的出度,计算
Figure PCTCN2020080472-appb-000014
的概率密度函数为:
Figure PCTCN2020080472-appb-000015
式中,α为归一化参数,ρ为社区分离参数,其取值范围为[0,1]之间的实数,
Figure PCTCN2020080472-appb-000016
outd max为源节点最大出度,p(x)为单调递减函数;
Figure PCTCN2020080472-appb-000017
视为连续随机变量,根据概率密度函数的性质得到:
Figure PCTCN2020080472-appb-000018
计算节点u与其他社区中结点相关的出度
Figure PCTCN2020080472-appb-000019
为:
Figure PCTCN2020080472-appb-000020
Figure PCTCN2020080472-appb-000021
式中,y为一个符合U(0,1)分布的随机数,某一节点与其他社区中节点相关的出度
Figure PCTCN2020080472-appb-000022
与y满足:
Figure PCTCN2020080472-appb-000023
对于社交网络模式信息S中每个边模式ES,在社交网络模式信息S中找到相关的源节点模式VS s、目标节点的模式VS t、社区模式CS,生成的边的数量ES.amount为n e,源节点数量VS s.amount为n s,目标节点数量VS t.amount为n t,社区数量CS.amount为n c,CS.λ s和CS.λ t为两个幂律分布的参数;
根据社区数量CS.amount,社区大小分布参数CS.λ s和CS.λ t,确定每个社区的矩阵表示的大小:
Figure PCTCN2020080472-appb-000024
生成该社区与其他社区之间的边,计算一个源节点u随机生成一个与其他社区之间节点的出度
Figure PCTCN2020080472-appb-000025
生成
Figure PCTCN2020080472-appb-000026
个不同的目标节点,从而为源节点u生成与其他社区中节点相连的边。
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,所述基于度分布生成模型以流式生成图数据,通过比较当前时刻与上一时刻的源节点和目标节点 数量,得到需要新增加的源节点和目标节点数量,通过简单图的生成方式生成图数据包括:
获取源节点数量n s、目标节点数量n t、期望生成的边数量n e、目标节点的入度分布distr in、源节点的出度分布distr out,增长率参数r g,所述增长率参数r g为区间[0,1]之间的实数;
初始化变量pc lt为0,pc tg为r g
对于每个ID小于n s·pc tg的源节点u,计算该节点的出度outd;
生成outd个不同的ID小于n t·pc tg的目标节点,生成新的边。
与现有技术相比,本公开具有如下优点:
采用本公开的基于度分布生成模型的社交网络图生成方法提出度分布生成模型以快速生成符合特定分布的随机数,高效地为每个节点确定出度,并确定相应数量的目标节点,从而生成图,生成图的边表示网络中用户的交互关系,生成的图具有真实社交网络的特点,能够作为各种网络分析任务的输入数据,满足多种应用场景的需要,生成方法高效,可扩展性强,适合生成大规模图数据。
附图说明
构成说明书的一部分的附图描述了本公开的实施例,并且连同描述一起用于解释本公开的原理。
参照附图,根据下面的详细描述,可以更加清楚地理解本公开,其中:
图1为本公开提出的基于度分布生成模型的社交网络图生成方法的流程。
具体实施方式
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例只是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
随着互联网技术的不断发展,社交网络平台蓬勃发展,网络规模不断扩大,网络平台中的用户数以亿计,用户间的交互关系纷繁复杂。这样复杂的网络关系可以用图来表示,用户表示为图中的节点,用户间的交互关系,例如,关注、评论、点赞等行为表示为边。许多社交网络分析任务处理这样大规模的网络图用于辅助实际业务,例如,社区发现算法能够检测出网络中的社区结构,这些结构信息能够辅助于风险控制任务和用户推荐任务等。 为了验证社交网络分析算法的有效性和可扩展性,往往需要使用合成数据集,因为抽取实际应用场景中的网络数据往往需要消耗大量资源,而快速合成大规模网络数据便十分必要。
本公开的目的在于提出一种基于度分布生成模型的社交网络图生成方法,该方法利用用户自定义的模式信息生成社交网络图,能够满足多种应用场景的需要,生成方法高效,可扩展性强,适合生成大规模图数据。生成图中的节点可以代表社交网络中的用户,边可以表示用户的行为。
下面结合附图和实施例对本公开提供的一种基于度分布生成模型的社交网络图生成方法进行更详细地说明。
基于度分布生成模型的社交网络图生成方法,在图的矩阵表示上生成数据,对于每个源节点,随机生成一个出度,再生成若干目标节点ID,从而生成边。为了加速生成过程,我们提出了一种新的生成模型,称为度分布生成模型(D^2G),使用这一模型,为一个源节点确定出度或生成一个目标节点的时间复杂度为O(1)。因此,适合使用D^2G模型生成大规模图数据,此外,D^2G是一个通用模型,只要提供度数分布的概率密度函数或概率质量函数,就可以使用该模型生成对应度数分布的图数据。
图1为本公开提出的基于度分布生成模型的社交网络图生成方法的流程图,如图1所示,所述基于度分布生成模型的社交网络图生成方法:
10,设置用于社交网络图生成的模式信息,根据社交网络图生成的模式信息生成网络图数据;
20,设置度分布生成模型,根据度分布生成模型实现随机生成一个源节点的出度和多个目标节点ID,使得源节点、目标节点的出度和入度分布符合预期分布;
30,获取源节点和目标节点数量及度分布参数,基于度分布生成模型生成社交网络图的简单图;
40,基于度分布生成模型生成社交网络图,确定社区大小,对于同一社区中的图和不同社区中的图,分别获取每一部分的源节点和目标节点数量,生成简单图后合并为一个社交网络图;
50,基于度分布生成模型以流式生成图数据,通过比较当前时刻与上一时刻的源节点和目标节点数量,得到新增加的源节点和目标节点数量,通过简单图的生成方式生成图数据。
所述设置用于社交网络图生成的模式信息,根据社交网络图生成的模式信息生成网络图数据包括:
设置节点模式信息、设置边模式信息、设置社区模式信息、设置社交网络图模式信息、设置用于生成社交网络图的符号表示;
所述节点模式信息包括:VS=(lbl,amount,attr),其中lbl是节点标签,amount是标签为lbl的节点数量,attr是节点属性信息,attr为可选值;
所述边模式信息包括:ES=(lbl,lbl s,lbl t,amount,distr in,distr out,attr),其中lbl是边的标签信息,lbl s和lbl t分别为源节点和目标节点的标签,amount为预期生成的边的数量,distr in和distr out分别为目标节点的入度分布和源节点的出度分布,attr为边的属性信息,attr为可选值;
所述社区模式信息包括:CS=(lbl e,amount,λ st,ρ),表示在标签为lbl e的边构成的图上构建社区,amount为生成的社区数量,社区大小服从幂律分布,λ s和λ t分别为所有社区中源节点和目标节点数量服从幂律分布的参数,ρ为社区分离参数,社区分离参数ρ是取值范围为[0,1]中的一个实数,ρ的取值越大,社区之间边的数量越多;
所述社交网络图模式信息包括:SGS=(VSS,ESS,CSS),其中VSS为节点模式的集合,ESS为边的模式集合,CSS为社区模式的集合;
所述设置用于生成的社交网络图,其符号表示包括:
设置有向异构图G=(V,E),其中V为节点集合,
Figure PCTCN2020080472-appb-000027
为边集;
一个节点v∈V为一个三元组(ID,lbl,attr),其中lbl为节点标签,attr为节点属性,ID为一个节点的唯一标识;
一条边e∈E以为一个四元组(v s,v t,lbl,attr),v s和v t分别为一条边的源节点和目标节点的ID,lbl为边的标签,attr为边的属性,v s、v t和lbl唯一确定一条边。
节点和边的属性信息是可选的。
所述设置度分布生成模型,根据度分布生成模型实现一个源节点随机生成出度和目标节点ID,使得源节点、目标节点的出度和入度分布符合预期分布包括:
计算度分布生成模型的概率质量函数:
Figure PCTCN2020080472-appb-000028
d min和d max分别为节点的最小度数和最大度数,θ为节点度数分布的参数,P(D=x;θ)为度数为x的节点的存在概率,α为归一化参数,使得所有可能的度数存在概率之和为1;
计算α的公式如下:
Figure PCTCN2020080472-appb-000029
累积分布函数CDF的公式如下:
Figure PCTCN2020080472-appb-000030
其中,x∈[d min,d max];
为了生成一个满足累积分布函数为F(x)的随机数,首先生成一个服从均匀分布U(0,1)的随机数y,然后F -1(y)就是生成的满足累计分布函数为F(x)的随机数。为了高效地计算F -1(y),设计一个新的函数G,如下所示:
G(z)=argmax xF(x)≤z,x∈[d min,d max];
其中,z∈{i·step|i∈N +,step=minP(D=x),i·step≤1}。给定一个服从均匀分布U(0,1)的随机数y,可以通过函数G(·)直接得到:
Figure PCTCN2020080472-appb-000031
使用度分布生成模型实现GenOutDegree(distr out,n s,n e)程序,该程序输入的参数有:节点出度分布distr out,节点数量n s和预期边的数量n e,输出为一个满足distr out分布的出度。
根据节点出度分布distr out、节点数量n s和预期边的数量n e,对一个源节点计算满足distr out分布的出度如下:
计算生成的边的数量:
Figure PCTCN2020080472-appb-000032
其中,outd min和outd max分别为模式信息中提供的源节点的最小出度和最大出度,θ out为节点出度分布distr out的参数;
如果预期边的数量n e=-1,则不需要调整参数,生成的边的数量为n′ e;否则,调整节点最大出度outd max以使得n′ e与n e相符,共有三种情况:
如果n′ e<n e,则增大outd max,直到度数为outd max的节点数量小于1,或者n′ e≥n e
如果n′ e=n e,则不需要调整outd max
如果n′ e>n e,则减小outd max,直到n′ e≤n e
计算累积分布函数:
Figure PCTCN2020080472-appb-000033
其中,x∈[outd minoutd max];
计算生成一个满足累计分布函数为F(x)的随机数,y为一个服从均匀分布U(0,1)的随机数,则F -1(y)为一个源节点u生成的符合distr out分布的出度;
构造函数G(z)=argmax xF(x)≤z,x∈[outd minoutd max],其中,z∈{i·step|i∈N +,step=minP(D=x),i·step≤1};
生成一个源节点u的符合distr out分布的出度
Figure PCTCN2020080472-appb-000034
对于一个确定出度的节点,生成一个符合预期分布的目标节点;
根据节点入度分布distr in,目标节点数量n t,预期边的数量n e,得到符合预期节点入度分布的一个目标节点ID;
给出一个目标节点id与入度关系的约束条件。给定n t个目标节点
Figure PCTCN2020080472-appb-000035
按照id从小到大排序,这些节点入度非递增。这样的约束条件是合理的,因为如果希望节点id与入度之间没有明显的关系,可以随机生成一个[1,n t]上正整数的一个排列,然后将节点id映射为排列中对应的值。
计算节点入度和的累积分布函数:
Figure PCTCN2020080472-appb-000036
式中,x∈[ind min,ind max],β为归一化参数,
Figure PCTCN2020080472-appb-000037
给定一个服从U(0,1)分布的随机数y,首先找到两个累积分布函数值F s(x 1)和F s(x 2),满足F s(x 1)≤y≤F s(x 2),x 1+1≥x 2,以及这两个函数值对应的节点ID;
构造辅助函数:H 1(z)=F s(argmax xF s(x)≤z),H 2(z)=F s(argmin xF s(x)≥z),式中,x是节点入度,z∈{i·step|i∈N +},
Figure PCTCN2020080472-appb-000038
i·step≤1;
计算两个累积分布函数值所对应的节点ID为:
Figure PCTCN2020080472-appb-000039
Figure PCTCN2020080472-appb-000040
式中,x 1=argmax xF s(x)≤z,x 2=argmin xF s(x)≥z;
生成一个服从U(0,1)分布的随机数y,目标节点ID为:
Figure PCTCN2020080472-appb-000041
Figure PCTCN2020080472-appb-000042
所述获取源节点和目标节点数量及度分布参数,基于度分布生成模型生成社交网络图的简单图包括:
通过输入参数源节点数量n s、目标节点数量n t、期望生成的边数量n e、目标节点的入度分布distr in、源节点的出度分布distr out
以n s×n t的矩阵M表示一个图,以M ij=1表示存在一条从源节点v i指向目标节点v j的有向边,M ij=0表示不存在有向边,计算任一节点u的出度outd;
确定outd个不同的目标节点,构建outd条边。
所述基于度分布生成模型生成社交网络图,确定社区大小,对于同一社区中的图和不同社区中的图,分别获取每一部分的源节点和目标节点数量,生成简单图后合并为一个社 交网络图包括:
获取社交网络模式信息S,记d out(u)为节点u的出度,
Figure PCTCN2020080472-appb-000043
为节点u与同一社区中节点相关的出度,
Figure PCTCN2020080472-appb-000044
为节点u与其他社区中节点相关的出度,计算
Figure PCTCN2020080472-appb-000045
的概率密度函数为:
Figure PCTCN2020080472-appb-000046
式中,α为归一化参数,ρ为社区分离参数,其取值范围为[0,1]之间的实数,
Figure PCTCN2020080472-appb-000047
outd max为源节点最大出度,p(x)为单调递减函数,表示一个源节点u有较小的
Figure PCTCN2020080472-appb-000048
的概率更高,即两个社区间节点连接稀疏的概率更高,参数ρ越大,一个源节点有较大的
Figure PCTCN2020080472-appb-000049
的概率更高,即不同社区之间边的数量更多;
Figure PCTCN2020080472-appb-000050
视为连续随机变量,根据概率密度函数的性质得到:
Figure PCTCN2020080472-appb-000051
计算节点u与其他社区中结点相关的出度
Figure PCTCN2020080472-appb-000052
为:
Figure PCTCN2020080472-appb-000053
Figure PCTCN2020080472-appb-000054
式中,y为一个符合U(0,1)分布的随机数,某一节点与其他社区中节点相关的出度
Figure PCTCN2020080472-appb-000055
与y满足:
Figure PCTCN2020080472-appb-000056
对于社交网络模式信息S中每个边模式ES,在社交网络模式信息S中找到相关的源节点模式VS s、目标节点的模式VS t、社区模式CS,生成的边的数量ES.amount为n e,源节点数量VS s.amount为n s,目标节点数量VS t.amount为n t,社区数量CS.amount为n c,CS.λ s和CS.λ t为两个幂律分布的参数;
根据社区数量CS.amount,社区大小分布参数CS.λ s和CS.λ t,确定每个社区的矩阵表示的大小:
Figure PCTCN2020080472-appb-000057
生成该社区与其他社区之间的边,计算一个源节点u随机生成一个与其他社区之间节点的出度
Figure PCTCN2020080472-appb-000058
生成
Figure PCTCN2020080472-appb-000059
个不同的目标节点,从而为源节点u生成与其他社区中节点相连的边。
基于本公开的基于度分布生成模型的社交网络图生成方法的另一个实施例中,所述基于度分布生成模型以流式生成图数据,通过比较当前时刻与上一时刻的源节点和目标节点数量,得到需要新增加的源节点和目标节点数量,通过简单图的生成方式生成图数据包括:
获取源节点数量n s、目标节点数量n t、期望生成的边数量n e、目标节点的入度分布distr in、源节点的出度分布distr out,增长率参数r g,所述增长率参数r g为区间[0,1]之间的实数;
初始化变量pc lt为0,pc tg为r g
对于每个ID小于n s·pc tg的源节点u,计算该节点的出度outd;
生成outd个不同的ID小于n t·pc tg的目标节点,生成新的边。
各种社交网络平台蓬勃发展,网络规模不断扩大,许多网络分析任务处理这些大规模网络用于实际业务中。获取实际网络图结构往往需要消耗大量资源,因此有必要使用人工生成网络图技术高效地生成图,用于评估网络分析算法的有效性和可扩展性。
本公开提出的方法利用用户自定义的模式信息生成社交网络图,能够满足多种应用场景的需要。我们提出度分布生成模型以快速生成符合特定分布的随机数,利用这一模型,可以高效地为每个节点确定出度,并确定相应数量的目标节点,从而生成图,生成的图节点可以表示实际网络中的用户;生成图的边可以表示网络中用户的交互关系,例如用户间关注关系、私信行为等。
生成的图具有真实社交网络的特点,包括小世界、社区结构和幂律分布,能够作为各种网络分析任务,例如社区发现、社区搜索和网络表示学习等的输入数据。
对于本领域技术人员而言,显然本公开实施例不限于上述示范性实施例的细节,而且在不背离本公开实施例的精神或基本特征的情况下,能够以其他的具体形式实现本公开实施例。因此,无论从哪一点来看,均应将实施例看作是示范性的,而且是非限制性的,本公开实施例的范围由所附权利要求而不是上述说明限定,因此旨在将落在权利要求的等同要件的含义和范围内的所有变化涵括在本公开实施例内。不应将权利要求中的任何附图标记视为限制所涉及的权利要求。此外,显然“包括”一词不排除其他单元或步骤,单数不排除复数。系统、装置或终端权利要求中陈述的多个单元、模块或装置也可以由同一个单元、模块或装置通过软件或者硬件来实现。第一,第二等词语用来表示名称,而并不表示任何特定的顺序。
最后应说明的是,以上实施方式仅用以说明本公开实施例的技术方案而非限制,尽管参照以上较佳实施方式对本公开实施例进行了详细说明,本领域的普通技术人员应当理解,可以对本公开实施例的技术方案进行修改或等同替换都不应脱离本公开实施例的技术方案的精神和范围。

Claims (9)

  1. 一种基于度分布生成模型的社交网络图生成方法,其特征在于,包括:
    设置用于社交网络图生成的模式信息,根据社交网络图生成的模式信息生成网络图数据;
    设置度分布生成模型,根据度分布生成模型实现随机生成一个源节点的出度和多个目标节点ID,使得源节点、目标节点的出度和入度分布符合预期分布;
    获取源节点和目标节点数量及度分布参数,基于度分布生成模型生成社交网络图的简单图;
    基于度分布生成模型生成社交网络图,确定社区大小,对于同一社区中的图和不同社区中的图,分别获取每一部分的源节点和目标节点数量,生成简单图后合并为一个社交网络图;
    基于度分布生成模型以流式生成图数据,通过比较当前时刻与上一时刻的源节点和目标节点数量,得到新增加的源节点和目标节点数量,通过简单图的生成方式生成图数据。
  2. 根据权利要求1所述的基于度分布生成模型的社交网络图生成方法,其特征在于,所述设置用于社交网络图生成的模式信息,根据社交网络图生成的模式信息生成网络图数据包括:
    设置节点模式信息、设置边模式信息、设置社区模式信息、设置社交网络图模式信息、设置用于生成社交网络图的符号表示;
    所述节点模式信息包括:VS=(lbl,amount,attr),其中lbl是节点标签,amount是标签为lbl的节点数量,attr是节点属性信息;
    所述边模式信息包括:ES=(lbl,lbl s,lbl t,amount,distr in,distr out,attr),其中lbl是边的标签信息,lbl s和lbl t分别为源节点和目标节点的标签,amount为预期生成的边的数量,distr in和distr out分别为目标节点的入度分布和源节点的出度分布,attr为边的属性信息,是一个key-value结构的字典,key为属性名,value为属性取值;
    所述社区模式信息包括:CS=(lbl e,amount,λ st,ρ),表示在标签为lbl e的边构成的图上构建社区,amount为生成的社区数量,社区大小服从幂律分布,λ s和λ t分别为所有社区中源节点和目标节点数量服从幂律分布的参数,ρ为社区分离参数;
    所述社交网络图模式信息包括:SGS=(VSS,ESS,CSS),其中VSS为节点模式的集合,ESS为边的模式集合,CSS为社区模式的集合;
    所述设置用于生成的社交网络图,其符号表示包括:
    设置有向异构图G=(V,E),其中V为节点集合,
    Figure PCTCN2020080472-appb-100001
    为边集;
    一个节点v∈V为一个三元组(ID,lbl,attr),其中lbl为节点标签,attr为节点属性,ID为一个节点的唯一标识;
    一条边e∈E以为一个四元组(v s,v t,lbl,attr),v s和v t分别为一条边的源节点和目标节点的ID,lbl为边的标签,attr为边的属性,v s、v t和lbl唯一确定一条边。
  3. 根据权利要求2所述的基于度分布生成模型的社交网络图生成方法,其特征在于,所述社区分离参数ρ是取值范围为[0,1]中的一个实数,ρ的取值越大,社区之间边的数量越多。
  4. 根据权利要求1所述的基于度分布生成模型的社交网络图生成方法,其特征在于,所述设置度分布生成模型,根据度分布生成模型实现随机生成一个源节点的出度和多个目标节点ID,使得源节点、目标节点的出度和入度分布符合预期分布包括:
    计算度分布生成模型的概率质量函数:
    Figure PCTCN2020080472-appb-100002
    d min和d max分别为节点的最小度数和最大度数,θ为节点度数分布的参数,P(D=x;θ)为度数为x的节点的存在概率,α为归一化参数,使得所有可能的度数存在概率之和为1;
    根据节点出度分布distr out、节点数量n s和预期边的数量n e,对一个源节点计算满足distr out分布的出度如下:
    计算生成的边的数量:
    Figure PCTCN2020080472-appb-100003
    其中,outd min和outd max分别为模式信息中提供的源节点的最小出度和最大出度,θ out为节点出度分布distr out的参数;
    调整节点最大出度outd max以使得n′ e与n e相符;
    计算节点出度的累积分布函数:
    Figure PCTCN2020080472-appb-100004
    其中,x∈[outd min,outd max];
    计算生成一个满足累计分布函数为F(x)的随机数,y为一个服从均匀分布U(0,1)的随机数,则F -1(y)为一个源节点u生成的符合distr out分布的出度;
    构造函数G(z)=argmax xF(x)≤z,x∈[outd min,outd max],其中,z∈{i·step|i∈N +,step=minP(D=x),i·step≤1};
    生成一个源节点u的符合distr out分布的出度为:
    Figure PCTCN2020080472-appb-100005
  5. 根据权利要求4所述的基于度分布生成模型的社交网络图生成方法,其特征在于,所述调整节点最大出度outd max以使得n′ e与n e相符包括:
    如果n′ e<n e,则增大outd max,直到度数为outd max的节点数量小于1,或者n′ e≥n e
    如果n′ e=n e,则不需要调整outd max
    如果n′ e>n e,则减小outd max,直到n′ e≤n e
  6. 根据权利要求4所述的基于度分布生成模型的社交网络图生成方法,其特征在于,还包括:
    对于一个确定出度的节点,生成一个符合预期分布的目标节点;
    根据节点入度分布distr in,目标节点数量n t,预期边的数量n e,得到符合预期节点入度分布的一个目标节点ID;
    计算节点入度和的累积分布函数:
    Figure PCTCN2020080472-appb-100006
    式中,x∈[ind min,ind max],β为归一化参数,
    Figure PCTCN2020080472-appb-100007
    构造辅助函数:H 1(z)=F s(argmax xF s(x)≤x),H 2(z)=F s(argmin xF s(x)≥z),式中,x是节点入度,z∈{i·step|i∈N +},
    Figure PCTCN2020080472-appb-100008
    Figure PCTCN2020080472-appb-100009
    计算两个累积分布函数值所对应的节点ID为:
    Figure PCTCN2020080472-appb-100010
    Figure PCTCN2020080472-appb-100011
    式中,x 1=argmax xF s(x)≤z,x 2=argmin xF s(x)≥z;
    目标节点ID为:
    Figure PCTCN2020080472-appb-100012
  7. 根据权利要求6所述的基于度分布生成模型的社交网络图生成方法,其特征在于,所述获取源节点和目标节点数量及度分布参数,基于度分布生成模型生成社交网络图的简单图包括:
    通过输入参数源节点数量n s、目标节点数量n t、期望生成的边数量n e、目标节点的入度分布distr in、源节点的出度分布distr out
    以n s×n t的矩阵M表示一个图,以M ij=1表示存在一条从源节点v i指向目标节点v j的有向边,M ij=0表示不存在有向边,计算任一节点u的出度outd;
    确定outd个不同的目标节点,构建outd条边。
  8. 根据权利要求7所述的基于度分布生成模型的社交网络图生成方法,其特征在于, 所述基于度分布生成模型生成社交网络图,确定社区大小,对于同一社区中的图和不同社区中的图,分别获取每一部分的源节点和目标节点数量,生成简单图后合并为一个社交网络图包括:
    获取社交网络模式信息S,记d out(u)为节点u的出度,
    Figure PCTCN2020080472-appb-100013
    为节点u与同一社区中节点相关的出度,
    Figure PCTCN2020080472-appb-100014
    为节点u与其他社区中节点相关的出度,计算
    Figure PCTCN2020080472-appb-100015
    的概率密度函数为:
    Figure PCTCN2020080472-appb-100016
    式中,α为归一化参数,ρ为社区分离参数,其取值范围为[0,1]之间的实数,
    Figure PCTCN2020080472-appb-100017
    为源节点最大出度,p(x)为单调递减函数;
    Figure PCTCN2020080472-appb-100018
    视为连续随机变量,根据概率密度函数的性质得到:
    Figure PCTCN2020080472-appb-100019
    计算节点u与其他社区中结点相关的出度
    Figure PCTCN2020080472-appb-100020
    为:
    Figure PCTCN2020080472-appb-100021
    Figure PCTCN2020080472-appb-100022
    式中,y为一个符合U(0,1)分布的随机数,某一节点与其他社区中节点相关的出度
    Figure PCTCN2020080472-appb-100023
    与y满足:
    Figure PCTCN2020080472-appb-100024
    对于社交网络模式信息S中每个边模式ES,在社交网络模式信息S中找到相关的源节点模式VS s、目标节点的模式VS t、社区模式CS,生成的边的数量ES.amount为n e,源节点数量VS s.amount为n s,目标节点数量VS t.amount为n t,社区数量CS.amount为n c,CS.λ s和CS.λ t为两个幂律分布的参数;
    根据社区数量CS.amount,社区大小分布参数CS.λ s和CS.λ t,确定每个社区的矩阵表示的大小:
    Figure PCTCN2020080472-appb-100025
    生成该社区与其他社区之间的边,计算一个源节点u随机生成一个与其他社区之间节点的出度
    Figure PCTCN2020080472-appb-100026
    生成
    Figure PCTCN2020080472-appb-100027
    个不同的目标节点,从而为源节点u生成与其他社区中节点相连的边。
  9. 根据权利要求8所述的基于度分布生成模型的社交网络图生成方法,其特征在于,所述基于度分布生成模型以流式生成图数据,通过比较当前时刻与上一时刻的源节点和目标节点数量,得到需要新增加的源节点和目标节点数量,通过简单图的生成方式生成图数据包括:
    获取源节点数量n s、目标节点数量n t、期望生成的边数量n e、目标节点的入度分布distr in、源节点的出度分布distr out,增长率参数r g,所述增长率参数r g为区间[0,1]之间的 实数;
    初始化变量pc lt为0,pc tg为r g
    对于每个ID小于n s·pc tg的源节点u,计算该节点的出度outd;
    生成outd个不同的ID小于n t·pc tg的目标节点,生成新的边。
PCT/CN2020/080472 2020-03-20 2020-03-20 基于度分布生成模型的社交网络图生成方法 Ceased WO2021184367A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN202080005625.0A CN114207573A (zh) 2020-03-20 2020-03-20 基于度分布生成模型的社交网络图生成方法
PCT/CN2020/080472 WO2021184367A1 (zh) 2020-03-20 2020-03-20 基于度分布生成模型的社交网络图生成方法
US17/784,175 US12045285B2 (en) 2020-03-20 2020-03-20 Social graph generation method using a degree distribution generation model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/080472 WO2021184367A1 (zh) 2020-03-20 2020-03-20 基于度分布生成模型的社交网络图生成方法

Publications (1)

Publication Number Publication Date
WO2021184367A1 true WO2021184367A1 (zh) 2021-09-23

Family

ID=77767988

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/080472 Ceased WO2021184367A1 (zh) 2020-03-20 2020-03-20 基于度分布生成模型的社交网络图生成方法

Country Status (3)

Country Link
US (1) US12045285B2 (zh)
CN (1) CN114207573A (zh)
WO (1) WO2021184367A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609345A (zh) * 2021-09-30 2021-11-05 腾讯科技(深圳)有限公司 目标对象关联方法和装置、计算设备以及存储介质
CN114329099A (zh) * 2021-11-22 2022-04-12 腾讯科技(深圳)有限公司 重叠社区识别方法、装置、设备、存储介质及程序产品

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115514580B (zh) * 2022-11-11 2023-04-07 华中科技大学 一种自编码器溯源入侵检测方法及装置
CN116975373B (zh) * 2023-07-26 2025-07-18 中南大学 基于节点位置约束的人际社交动态网络可视化方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008052495A (ja) * 2006-08-24 2008-03-06 Sony Corp ネットワークシステム、情報処理装置および方法、プログラム並びに記録媒体
CN105550212A (zh) * 2015-12-03 2016-05-04 上海电机学院 一种用于网络构建基元挖掘的装置和方法
CN108510115A (zh) * 2018-03-29 2018-09-07 山东科技大学 一种面向动态社交网络的影响力最大化分析方法
CN110659395A (zh) * 2019-08-14 2020-01-07 平安科技(深圳)有限公司 关系网络图谱构建方法、装置、计算机设备和存储介质

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2775899C (en) * 2009-09-30 2021-07-27 Evan V. Chrapko Determining connectivity within a community
US8880600B2 (en) * 2010-03-31 2014-11-04 Facebook, Inc. Creating groups of users in a social networking system
US8560605B1 (en) * 2010-10-21 2013-10-15 Google Inc. Social affinity on the web
US8626835B1 (en) * 2010-10-21 2014-01-07 Google Inc. Social identity clustering
US8893008B1 (en) * 2011-07-12 2014-11-18 Relationship Science LLC Allowing groups expanded connectivity to entities of an information service
US10311106B2 (en) * 2011-12-28 2019-06-04 Www.Trustscience.Com Inc. Social graph visualization and user interface
US20150120717A1 (en) * 2013-10-25 2015-04-30 Marketwire L.P. Systems and methods for determining influencers in a social data network and ranking data objects based on influencers
US20150242967A1 (en) * 2014-02-27 2015-08-27 Linkedin Corporation Generating member profile recommendations based on community overlap data in a social graph
CN104391972A (zh) * 2014-12-05 2015-03-04 深圳大学 一种拒绝率可控的Metropolis-Hastings图抽样算法
US20170270210A1 (en) * 2016-03-16 2017-09-21 Sysomos L.P. Data Infrastructure and Method for Ingesting and Updating A Continuously Evolving Social Network
CN105825147B (zh) * 2016-04-12 2018-07-27 上海交通大学 基于云服务的社交网络相似分组匿名方法
US20180103111A1 (en) * 2016-10-07 2018-04-12 International Business Machines Corporation Determination of well-knit groups in organizational settings
CN110135180B (zh) * 2019-05-15 2021-04-06 苏州大学 满足节点差分隐私的度分布直方图发布方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008052495A (ja) * 2006-08-24 2008-03-06 Sony Corp ネットワークシステム、情報処理装置および方法、プログラム並びに記録媒体
CN105550212A (zh) * 2015-12-03 2016-05-04 上海电机学院 一种用于网络构建基元挖掘的装置和方法
CN108510115A (zh) * 2018-03-29 2018-09-07 山东科技大学 一种面向动态社交网络的影响力最大化分析方法
CN110659395A (zh) * 2019-08-14 2020-01-07 平安科技(深圳)有限公司 关系网络图谱构建方法、装置、计算机设备和存储介质

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113609345A (zh) * 2021-09-30 2021-11-05 腾讯科技(深圳)有限公司 目标对象关联方法和装置、计算设备以及存储介质
CN113609345B (zh) * 2021-09-30 2021-12-10 腾讯科技(深圳)有限公司 目标对象关联方法和装置、计算设备以及存储介质
CN114329099A (zh) * 2021-11-22 2022-04-12 腾讯科技(深圳)有限公司 重叠社区识别方法、装置、设备、存储介质及程序产品
CN114329099B (zh) * 2021-11-22 2023-07-07 腾讯科技(深圳)有限公司 重叠社区识别方法、装置、设备、存储介质及程序产品

Also Published As

Publication number Publication date
US12045285B2 (en) 2024-07-23
US20230032521A1 (en) 2023-02-02
CN114207573A (zh) 2022-03-18

Similar Documents

Publication Publication Date Title
CN112199189B (zh) 深度学习模型对资源受限边缘设备的适应
CN112231592B (zh) 基于图的网络社团发现方法、装置、设备以及存储介质
WO2022179384A1 (zh) 一种社交群体的划分方法、划分系统及相关装置
CN111932386A (zh) 用户账号确定方法及装置、信息推送方法及装置、电子设备
CN111444346B (zh) 一种用于文本分类的词向量对抗样本生成方法及装置
CN115686868B (zh) 一种基于联邦哈希学习的面向跨节点多模态检索方法
US12045285B2 (en) Social graph generation method using a degree distribution generation model
CN113228059A (zh) 面向跨网络的表示学习算法
CN113052712B (zh) 社交数据的分析方法、系统及存储介质
WO2022001924A1 (zh) 构建知识图谱的方法、装置及系统、计算机存储介质
WO2023174189A1 (zh) 图网络模型节点分类方法、装置、设备及存储介质
CN114610758B (zh) 基于数据仓库的数据处理方法、装置、可读介质及设备
CN109767008A (zh) 一种基于元模式的高度异构网络多态特征学习方法
US12625886B2 (en) Method and system for automatic data clustering
CN112115971A (zh) 一种基于异质学术网络进行学者画像的方法及系统
CN113992520B (zh) 一种虚拟网络资源的部署方法和系统
CN115391525A (zh) 文本标签预测模型训练方法、文本标签预测方法、装置、设备及介质
CN112528109B (zh) 一种数据分类方法、装置、设备及存储介质
Pasteris et al. Data distribution and scheduling for distributed analytics tasks
CN106650800B (zh) 基于Storm的马尔可夫等价类模型分布式学习方法
CN116610820B (zh) 一种知识图谱实体对齐方法、装置、设备及存储介质
CN118740518A (zh) 一种算力互联网流量处理方法及系统
Yang et al. InSyfer: Industrial Control Protocols Syntax Inference via Graph Representation Learning
Wu et al. Dynamic stochastic block model with scale-free characteristic for temporal complex networks
CN115809698A (zh) 针对图神经网络的黑盒逃逸图注入攻击方法

Legal Events

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

Ref document number: 20925544

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20925544

Country of ref document: EP

Kind code of ref document: A1