A method and apparatus for generating a time sequence diagram with a time-limited community
By grouping the node set and binding it with time windows, an index structure is constructed, and time-series edges within and between time-limited communities are generated. This solves the problem of insufficient community extinction characterization in existing methods, realizes the technical means of generating time-limited communities, and improves the generation efficiency of time-series graphs.
Patent Information
- Application Number
- CN202410544086.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-12-26
- Estimated Expiration
- 2044-04-30
AI Technical Summary
Existing time series diagram generation methods fail to effectively depict the demise of communities and cannot adapt to user-specified distributions, resulting in low generation efficiency.
By grouping the node set in the target scenario, the time window of the time-limited community is generated, the timestamp distribution of the time-limited community is generated, the technical means of generating the time-limited community are described, the timestamp of the time-limited community is generated, the method of generating the time sequence diagram is described, and the time sequence diagram is generated.
It realizes an index structure that can migrate between communities with different time limits, generates time series graphs that meet user requirements, reflects the real network distribution, and improves generation efficiency.
Smart Images

Figure CN118262008B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of network information technology, and particularly relates to a time series graph generation method and device with time-limited communities. BACKGROUND
[0002] With the rapid development of graph data management technology, graph data synthesis methods have attracted more and more attention. Due to the reasons such as privacy sensitivity and high cost in real world network graph data, it is not easy to obtain, and community discovery, community search, social recommendation and other tasks need a large amount of graph data to evaluate the effectiveness and efficiency of related algorithms, so quickly generating graph data that meets user requirements has become a basic research problem to promote the development of large-scale graph data management and analysis field.
[0003] Many research results have been achieved in the field of graph generation; at present, a series of static graph generation algorithms have been proposed. On this basis, in order to generate community structure in the graph, more and more social network graph generation algorithms have emerged. However, the above-mentioned static graph generation algorithms do not consider the time sequence evolution characteristics of the graph. In order to solve this problem, a series of time sequence graph generation algorithms have been proposed; such algorithms timestamp each edge, that is, the exact time when the interaction between nodes occurs; further, some methods consider both the time sequence of the graph and the community structure in the graph, and generate time sequence social network graph data. However, most of the current graph generation methods only focus on the formation process of the community, and do not reflect the extinction process of the community. SUMMARY
[0004] Therefore, the present disclosure proposes a time sequence graph generation method and device with time-limited communities, an electronic device and a storage medium.
[0005] According to an aspect of the present disclosure, a time sequence graph generation method with time-limited communities is provided, which comprises:
[0006] grouping a node set in a target scene to obtain nodes contained in each time-limited community in a plurality of time-limited communities; wherein the time-limited community represents a community that is in an active state for a period of time and eventually goes to extinction; the number of nodes contained in the plurality of time-limited communities conforms to a power law distribution;
[0007] generating a time window for each time-limited community in the plurality of time-limited communities; wherein the starting time of the time window corresponding to the plurality of time-limited communities conforms to a uniform distribution, and the length of the time window corresponding to the plurality of time-limited communities conforms to a power law distribution;
[0008] construct an index structure that can migrate between different time-limited communities, and generate a time sequence edge within each time-limited community in the plurality of time-limited communities and / or a time sequence edge between different time-limited communities in the plurality of time-limited communities based on nodes contained in each time-limited community, a time window of each time-limited community, and the index structure;
[0009] generate a time sequence graph of the target scenario based on nodes contained in each time-limited community in the plurality of time-limited communities, a time window of each time-limited community in the plurality of time-limited communities, a time sequence edge within each time-limited community in the plurality of time-limited communities, and / or a time sequence edge between different time-limited communities in the plurality of time-limited communities.
[0010] In a possible implementation, the constructing an index structure that can migrate between different time-limited communities comprises:
[0011] selecting a time-limited community with the largest number of contained nodes from the plurality of time-limited communities, and establishing an out-degree distribution index and an in-degree distribution index for the time-limited community with the largest number of contained nodes;
[0012] selecting a time-limited community with the longest time window from the plurality of time-limited communities, and establishing a timestamp distribution index for the time-limited community with the longest time window.
[0013] In a possible implementation, the generating a time sequence edge within each time-limited community in the plurality of time-limited communities and / or a time sequence edge between different time-limited communities in the plurality of time-limited communities based on nodes contained in each time-limited community, a time window of each time-limited community, and the index structure comprises:
[0014] generating a tree structure about nodes contained in a first time-limited community; wherein the first time-limited community is any time-limited community in the plurality of time-limited communities;
[0015] determining an out-degree of a first source node based on the out-degree distribution index; wherein the first source node is any source node in the tree structure;
[0016] selecting a first target node corresponding to the first source node from the nodes contained in the first time-limited community based on the in-degree distribution index, wherein the number of the first target node is the same as the out-degree of the first source node;
[0017] generating a timestamp corresponding to the first target node within the time window of the first time-limited community based on the timestamp distribution index;
[0018] generating a time sequence edge associated with the first source node within the first time-limited community based on the first source node, the first target node, and the timestamp corresponding to the first target node.
[0019] In a possible implementation, the generating the time-ordered edges within each of the plurality of time-limited communities and / or between different time-limited communities of the plurality of time-limited communities based on the nodes contained in the time-limited communities, the time windows of the time-limited communities, and the index structure further includes:
[0020] determining an out-degree of the first source node, wherein the out-degree represents a number of edges associated with the node and not belonging to any time-limited community;
[0021] selecting, based on the index of the in-degree distribution, a second target node corresponding to the first source node from the nodes contained in the plurality of time-limited communities, wherein the number of the second target nodes is the same as the out-degree of the first source node, and the first source node and the second target node belong to different time-limited communities;
[0022] generating, based on the index of the timestamp distribution, a timestamp corresponding to the second target node from a complement of a common part of a time window of a time-limited community in which the first source node is located and a time window of a time-limited community in which the second target node is located;
[0023] generating, based on the first source node, the second target node, and the timestamp corresponding to the second target node, a time-ordered edge associated with the first source node and between different time-limited communities.
[0024] In a possible implementation, a number of the time-ordered edges between different time-limited communities of the plurality of time-limited communities is determined by a preset chaos parameter, wherein the chaos parameter represents a degree of clarity of a boundary between the different time-limited communities.
[0025] In a possible implementation, the generating a time window for each of the plurality of time-limited communities includes:
[0026] determining an expectation of a length of a time window of a first time-limited community according to a number of nodes contained in the first time-limited community;
[0027] determining a probability density function of the length of the time window of the first time-limited community according to the expectation of the length of the time window of the first time-limited community;
[0028] sampling a target length of the time window of the first time-limited community according to the probability density function of the length of the time window of the first time-limited community;
[0029] sampling a starting time of the target time window of the first time-limited community according to the target length of the time window of the first time-limited community and a preset time range;
[0030] determine a target time window of the first time-limited community based on a start time of the target time window of the first time-limited community and a length of the target time window of the first time-limited community.
[0031] In a possible implementation, the determining of the expectation of the length of the time window of the first time-limited community based on the number of nodes included in the first time-limited community comprises:
[0032] calculating an average value of the length of the time window of the first time-limited community based on the number of nodes included in the first time-limited community, wherein the average value of the length of the time window of the first time-limited community and the number of nodes included in the first time-limited community are logarithmically correlated;
[0033] determining the average value of the length of the time window of the first time-limited community as the expectation of the length of the time window of the first time-limited community.
[0034] In a possible implementation, the plurality of time-limited communities include a preset number of overlapping structures, wherein each overlapping structure includes a shared node existing in two time-limited communities, the degree of the shared node exceeds the degree of any other node in either of the two time-limited communities, and the ratio of the number of the shared node to the number of nodes in either of the two time-limited communities is a preset value.
[0035] According to another aspect of the present disclosure, a time-limited community-based time sequence graph generation apparatus is provided, which comprises:
[0036] a node grouping module configured to group a set of nodes in a target scene to obtain nodes included in each time-limited community in a plurality of time-limited communities, wherein the time-limited community represents a community that is in an active state in a period of time and eventually goes to extinction, and the number of nodes included in the plurality of time-limited communities conforms to a power-law distribution;
[0037] a time window binding module configured to generate a time window for each time-limited community in the plurality of time-limited communities, wherein the start time of the time window corresponding to the plurality of time-limited communities conforms to a uniform distribution, and the length of the time window corresponding to the plurality of time-limited communities conforms to a power-law distribution;
[0038] a time sequence edge module configured to construct an index structure that can migrate between different time-limited communities, and generate time sequence edges within each time-limited community in the plurality of time-limited communities and / or time sequence edges between different time-limited communities in the plurality of time-limited communities based on the nodes included in the time-limited communities, the time windows of the time-limited communities, and the index structure;
[0039] The generating module is configured to generate a time sequence graph of the target scene according to the nodes contained in each of the multiple time-limited communities, the time window of each of the multiple time-limited communities, the time sequence edges in each of the multiple time-limited communities, and / or the time sequence edges between different time-limited communities in the multiple time-limited communities.
[0040] According to another aspect of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the above method when executing the instructions stored in the memory.
[0041] According to another aspect of the present disclosure, a non-volatile computer-readable storage medium having stored thereon computer program instructions is provided, wherein the computer program instructions, when executed by a processor, implement the above method.
[0042] According to another aspect of the present disclosure, a computer program product is provided, comprising computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, which, when run in a processor of an electronic device, causes the processor in the electronic device to perform the above method.
[0043] By the embodiments of the present disclosure, a node set in a target scene is grouped to obtain nodes contained in each of multiple time-limited communities; the number of nodes contained in the multiple time-limited communities conforms to a power-law distribution; a time window is generated for each of the multiple time-limited communities; wherein the starting time of the time window corresponding to the multiple time-limited communities conforms to a uniform distribution, and the length of the time window corresponding to the multiple time-limited communities conforms to a power-law distribution; an index structure that can migrate between different time-limited communities is constructed, and time sequence edges in each of the multiple time-limited communities and / or time sequence edges between different time-limited communities in the multiple time-limited communities are generated based on the nodes contained in each of the multiple time-limited communities, the time window of each of the multiple time-limited communities, and the index structure; a time sequence graph of the target scene is generated according to the nodes contained in each of the multiple time-limited communities, the time window of each of the multiple time-limited communities, the time sequence edges in each of the multiple time-limited communities, and / or the time sequence edges between different time-limited communities in the multiple time-limited communities. In this way, through the node grouping stage, the time window binding stage, and the time sequence edge stage, a time sequence graph with time-limited communities is generated, wherein the number of nodes contained in the time-limited communities, the starting time of the time window of the time-limited communities, and the length thereof all conform to a certain distribution, and can reflect the real network distribution. As an example, a user can specify the parameters of a certain distribution; and the time sequence edges can be quickly generated based on the index structure that can migrate between different time-limited communities, so that a time sequence graph containing time-limited communities and conforming to user requirements can be generated in a flexible and efficient manner.
[0044] Other features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the drawings. BRIEF DESCRIPTION OF DRAWINGS
[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate exemplary embodiments, features, and aspects of the present disclosure and serve to explain the principles of the present disclosure.
[0046] Figure 1 A schematic diagram showing an online financial transfer network according to an embodiment of the present disclosure.
[0047] Figure 2 A schematic diagram showing a real discussion network according to an embodiment of the present disclosure.
[0048] Figure 3 A flowchart showing a method of generating a time series graph with time-limited communities according to an embodiment of the present disclosure.
[0049] Figure 4 (a)-(b) show schematic diagrams of time window features in a real discussion network according to an embodiment of the present disclosure.
[0050] Figure 5 A flowchart showing a method of generating a time series graph with time-limited communities according to an embodiment of the present disclosure.
[0051] Figure 6 A flowchart showing a method of generating a time series graph with time-limited communities according to an embodiment of the present disclosure.
[0052] Figure 7 A schematic diagram showing the average length of time windows in each bucket in network A according to an embodiment of the present disclosure.
[0053] Figure 8 A flowchart showing a method of generating a time series graph with time-limited communities according to an embodiment of the present disclosure.
[0054] Figure 9 A flowchart showing a method of generating a time series graph with time-limited communities according to an embodiment of the present disclosure.
[0055] Figure 10 A schematic diagram showing generating out-degrees based on an index of out-degree distribution according to an embodiment of the present disclosure.
[0056] Figure 11 A flowchart showing a method of generating out-degrees of a first source node according to an embodiment of the present disclosure.
[0057] Figure 12A diagram illustrating determining a target node according to an embodiment of the disclosure.
[0058] Figure 13 A flowchart illustrating a method of generating a target node according to an embodiment of the disclosure.
[0059] Figure 14 A flowchart illustrating a method of generating a timestamp according to an embodiment of the disclosure.
[0060] Figure 15 A flowchart illustrating a method of generating a temporal edge between time-limited communities according to an embodiment of the disclosure.
[0061] Figure 16 A flowchart illustrating a method of generating a temporal edge according to an embodiment of the disclosure.
[0062] Figure 17 A block diagram illustrating a temporal graph generation apparatus with time-limited communities according to an embodiment of the disclosure.
[0063] Figure 18 A block diagram illustrating an electronic device 1900 according to an embodiment of the disclosure. DETAILED DESCRIPTION
[0064] Various exemplary embodiments, features, and aspects of the disclosure will be described in detail below with reference to the accompanying drawings. The same reference numbers in different drawings represent the same or similar elements. Although various aspects of embodiments are illustrated in the drawings, the drawings are not necessarily drawn to scale unless specifically noted.
[0065] Reference in the specification to "one embodiment" or "some embodiments" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the disclosure. The appearances of the phrase "in one embodiment" or "in some embodiments" in various places in the specification are not necessarily all referring to the same embodiment, although it can. The terms "including," "comprising," "having," and variations thereof are meant to encompass the item listed thereafter and also any additional item. Unless otherwise noted, the terms "including" and "comprising" are used in an inclusive sense, and should be understood therefore to imply the possibility of including additional items.
[0066] In the present disclosure, "at least one" means one or more, and "multiple" means two or more. The "and / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after it. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b, or c can represent: a, b, c, a-b, a-c, b-c, or a-b-c, where a, b, and c can be single or multiple.
[0067] In addition, in order to better illustrate the present disclosure, a large number of specific details are given in the specific embodiments below. Those skilled in the art should understand that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, elements and circuits that are well known to those skilled in the art are not described in detail, in order to highlight the main ideas of the present disclosure.
[0068] As a living being, a community in the real world not only experiences a formation process, but also experiences a dissipation process. Among them, a community can represent a unit composed of several objects participating in the same activity; for example:
[0069] Scenario one, in an online financial transfer scenario, relevant personnel may have abnormal transfer behavior, for example, they may frequently transfer to each other within a very short period of time. Figure 1 A schematic diagram of an online financial transfer network according to an embodiment of the present disclosure is shown as follows: Figure 1 As shown, nodes A, B, C… represent accounts, and account-to-account transfers occurring at a specific time are represented as time sequence edges, where the timestamp represents the real time of each time sequence edge, and the timestamp is in units of minutes; for example, the time sequence edge between the account represented by node B and the account represented by node A in the figure indicates that the account represented by node B transferred to the account represented by node A at 15:36 on June 22. Figure 1 The financial transfer network shown in the figure has a group of abnormal transfers, specifically, the account group labeled {A, B, C, D, E} (i.e. the purple nodes in the figure) has frequent user-to-user transfers within the time period from 15:31 to 15:46 on June 22, and this group is only active for 15 minutes, indicating potential abnormal transfer activity; the transfer activity of this group {A, B, C, D, E} is limited to a specific time interval.
[0070] Scenario two, in an online discussion scenario, personnel participating in the discussion frequently discuss within a limited period of time. Figure 2A schematic diagram of a real discussion network according to an embodiment of the present disclosure is shown as Figure 2 As shown, a small real discussion network in 2022 is extracted from the Math Overflow website, where nodes v1, v2… represent the participants in the discussion (e.g., v1 represents Jins, v2 represents Ian Agol, v3 represents Johannes Hahn, and v4 represents Derek Holt), and the discussion between the participants at a specific time is represented as a time edge, where the timestamp represents the real time of each time edge, and the timestamp is in half-hour units. The discussion group labeled (v1, v2, v3, v4) is composed of four people: Jins, Ian Agol, Johannes Hahn, and Derek Holt, and the discussion revolves around a specific mathematical topic, starting on April 12, 2022, at 5:18 and ending at 11:04 on the same day, and the discussion group only lasts for a limited time; the discussion activities between the members in the discussion group are limited to a specific time interval.
[0071] In the field of graph data management, nodes and communities are two important concepts. A node refers to an entity (Entity), which can be a person, a place, an object, or any other type of entity. A community refers to a subgraph formed by a group of nodes in the graph that are closely connected to each other, and the connections between these nodes are more frequent than those between other nodes. In the above Figure 1 and Figure 2 The networks shown in the above scenarios both have a community that goes through a formation process and a dissipation process, and the activities of the members in the community are limited to a specific time interval; the present disclosure proposes a time-limited community definition to characterize such a community that is active within a specific time interval before eventually disappearing, for example, Figure 1 In the above scenario, the group {A, B, C, D, E} is a time-limited community, Figure 2 In the above scenario, the discussion group (v1, v2, v3, v4) is also a time-limited community; the above scenarios one and two respectively show that there are communities in the financial transfer network and the community Q&A website whose activities are limited to a specific time interval, i.e., there are time-limited communities. In addition to the above scenarios one and two, other scenarios that have time-limited communities include the time-series protein interaction network, etc. The discovery of time-limited communities is helpful for searching for abnormal transfer groups on financial transfer networks, conducting community detection on community Q&A websites for group recommendation and network monitoring, and detecting dynamic protein complexes on time-series protein interaction networks, etc.
[0072] However, the existing temporal graph generation method has insufficient ability to depict time-limited communities; most of the existing temporal graph generation algorithms either completely ignore the community extinction and only focus on the formation process of the community, or simply model the probability of a member node escaping the community at each snapshot. At the same time, the existing temporal graph generation method has insufficient ability to configure user-specified distribution; some temporal graph generation algorithms cannot adapt to user-specified distribution, while real-world networks may exhibit different kinds of distribution, for example, different timestamp distribution due to different formation and decay rates of the network. In addition, the existing temporal graph generation method has insufficient efficiency in generating a graph containing time-limited communities; it is usually operated on a snapshot-by-snapshot basis and treats the generation of each community as an independent task, which is inefficient in settings with large time spans or scales.
[0073] To solve the above technical problems, the embodiment of the present disclosure proposes a temporal graph generation method with time-limited communities by analyzing the characteristics of the collected real data, for example, a temporal graph dataset containing time-limited communities can be collected from the Math Overflow website for analysis. The method includes a node grouping stage, a time window binding stage, and a temporal edge stage, and generates a temporal graph with time-limited communities through the three stages. The number of nodes contained in the time-limited community, the starting time and length of the time window of the time-limited community, and the like conform to a specific distribution and can reflect the real network distribution; as an example, a user can specify the parameters of a specific distribution; and temporal edges can be quickly generated based on an index structure that can migrate between different time-limited communities, thereby generating a temporal graph containing time-limited communities and meeting user requirements in a flexible configuration and efficient manner.
[0074] Exemplarily, the temporal graph generation method with time-limited communities provided by the embodiment of the present disclosure can be executed by an electronic device or a functional module in the electronic device, wherein the functional module can be a hardware entity or a software module, and no limitation is made in this regard; exemplarily, the electronic device can be a terminal or a server, wherein the server can be a standalone physical server, or a server cluster composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and basic cloud computing services such as big data and artificial intelligence platforms, etc. The terminal can be a smartphone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a smart voice interaction device, a smart home appliance, and a vehicle-mounted terminal, etc.
[0075] Figure 3 A flowchart of a temporal graph generation method with time-limited communities according to an embodiment of the present disclosure is shown in FIG. 1. Figure 3 As shown in FIG. 1, the method includes the following steps:
[0076] Step 301, grouping the node set in the target scene to obtain nodes contained in each time-limited community in the plurality of time-limited communities.
[0077] The step 301 can also be referred to as a node grouping stage. In this stage, the node set is divided into different groups, each of which corresponds to a time-limited community, and the nodes in the group are the nodes contained in the time-limited community, so that the nodes contained in each time-limited community can be determined.
[0078] The time-limited community represents a community that is active and eventually dies out within a period of time; where active means that there is interaction between nodes in the time-limited community, and dies out means that the nodes in the time-limited community no longer interact, or do not interact within a certain period of time.
[0079] Exemplarily, the target scene can be the online financial transfer, community question and answer website, time sequence protein interaction, etc. The nodes in the target scene are specific activity objects in the user-specified scene, and the time-limited community is an active community in a specific time interval before eventually dying out in the target scene, for example, the target scene is an online financial transfer scene, the nodes in the target scene are accounts that transfer money, and a time-limited community can be a group {A, B, C, D, E} in the above example. Figure 1 For example, the target scene is an online discussion scene, the nodes in the target scene are personnel participating in the discussion, and a time-limited community can be a discussion group (v1, v2, v3, v4) in the above example. Figure 2
[0080] Exemplarily, the number of nodes n v in the target scene and the number of nodes n c in the node set can be specified by the user according to the needs.
[0081] The number of nodes contained in the plurality of time-limited communities conforms to a power-law distribution. The number of nodes contained in the time-limited community can represent the size of the time-limited community. According to the analysis of real data, it is shown that the size of the community usually conforms to a power-law distribution in a complex network containing multiple communities; therefore, the number of nodes contained in the plurality of time-limited communities obtained by grouping the node set in the target scene in this stage conforms to a power-law distribution, which can reflect the real network distribution. Exemplarily, the parameters of the power-law distribution can be specified by the user according to the needs; for example, the user can specify the size of the index in the power-law distribution.
[0082] Exemplarily, the node numbers in the node set can be divided into n c segments in order, where each segment represents a node set contained in a time-limited community; and n c The number of nodes in a segment follows a power-law distribution, resulting in most segments having a small number of nodes and a few segments having a large number of nodes.
[0083] Step 302: Generate a time window for each of the multiple time-limited communities.
[0084] Step 302 can also be called the time window binding phase; this phase binds an active time window to each time-limited community.
[0085] The start times (also known as start timestamps) of the time windows corresponding to the multiple time-limited communities conform to a uniform distribution, and the lengths of the time windows corresponding to the multiple time-limited communities conform to a power-law distribution.
[0086] Specifically, for any given time window and any time-limited community, the time window w should satisfy the following conditions: the interactions between nodes within the time-limited community are more frequent than the interactions between nodes outside the time window w; and the interactions between nodes within the time-limited community are more frequent than the interactions between nodes within the time-limited community and other nodes within the time window w. For example, a time-limited community can be defined as described above. Figure 2 The subgraph formed by the group {v1,v2,v3,v4} can have a time window w corresponding to the time-limited community, which is [64,71], that is, the interval formed by the earliest and last interaction times within the time-limited community. Within the time window [64,71], groups {v1,v2,v3,v4} interact frequently with each other, while outside the time window [64,71], no interaction occurs. Therefore, the interaction between groups {v1,v2,v3,v4} within the time window [64,71] is more frequent than their interaction outside the time window [64,71]. Simultaneously, groups {v1,v2,v3,v4} do not interact with other nodes such as v5, v6, v7, and v8 within the time window [64,71]. Therefore, the interaction between groups {v1,v2,v3,v4} within the time window [64,71] is more frequent than their interaction with other nodes such as v5, v6, v7, and v8 within the time window [64,71].
[0087] Figure 4 (a)-(b) illustrate schematic diagrams of time window features in a real discussion network according to an embodiment of the present disclosure, the real discussion network being extracted from the Math Overflow website, in which time windows of time-limited communities have features such as Figure 4 The features shown in (a)-(b) Figure 4(a) shows the distribution of the starting time of time window t s The relationship between the starting time of time window t s The distribution is almost uniform, which is consistent with the expectation that users can freely choose when to start a discussion. Figure 4 (b) shows the distribution of the length of time window |w| (in days) and frequency, and it can be found that the length of time window |w| in the real discussion network presents a trend of approximate power-law distribution, which indicates that most discussions are short and only a small part of discussions last for a long time. Therefore, in this stage, the time window is generated for each time-limited community generated in the node grouping stage, and the starting time of the generated time window conforms to the uniform distribution and the length of the generated time window conforms to the power-law distribution, which can reflect the real network distribution.
[0088] Step 303, constructing an index structure that can migrate between different time-limited communities, and generating time sequence edges within each time-limited community in the plurality of time-limited communities and / or time sequence edges between different time-limited communities based on the nodes contained in each time-limited community, the time window of each time-limited community and the index structure.
[0089] This step 303 can also be called a time sequence edge stage; in this stage, the time sequence edges within each time-limited community or between different time-limited communities are generated based on the index structure that can migrate between different time-limited communities and the nodes contained in each time-limited community determined in the node grouping stage, and the time window generated for each time-limited community in the time window binding stage.
[0090] The time sequence edge is a directed edge used to represent the direction of interaction between two nodes and the time of interaction. For example, a time sequence edge is composed of a source node, a target node and a timestamp; wherein the source node is the node that initiates the activity, the target node is the node that receives the activity, and the timestamp represents the time when the interaction between the source node and the target node occurs with a certain time granularity. For example, the time-limited community can be the time-limited community generated in the node grouping stage. Figure 1The time sequence edge indicated by 06 / 22 15:36 (29094) is a time sequence edge in the time limit community, which indicates that the node B (i.e., the source node) in the time limit community transfers money to the node A (i.e., the target node) in the time limit community, the time of the transfer is 15:36 on June 22, and the corresponding timestamp is 29094. The time sequence edge indicated by 06 / 02 10:42 (0) is a time sequence edge between different time limit communities, which indicates that the node H (i.e., the source node) outside the time limit community transfers money to the node B (i.e., the target node) in the time limit community, the time of the transfer is 10:42 on June 2, and the corresponding timestamp is 0.
[0091] Exemplarily, the index structure can include an index of out-degree distribution, an index of in-degree distribution, and an index of timestamp distribution. As an example, the out-degree distribution can be a power-law distribution, i.e., the out-degree of a node in a time limit community obeys a power-law distribution, and the index of the out-degree distribution records the out-degree corresponding to different probability values. The in-degree distribution can be a power-law distribution, i.e., the in-degree of a node in a time limit community obeys a power-law distribution, and the index of the in-degree distribution records the in-degree corresponding to different probability values. The timestamp distribution can be a normal distribution, i.e., the timestamp of a time sequence edge in a time limit community obeys a normal distribution, and the index of the timestamp distribution records the timestamp corresponding to different probability values.
[0092] In a possible implementation, the constructing the index structure migratable between different time limit communities includes: selecting a time limit community with the largest number of contained nodes from the plurality of time limit communities, and establishing an index of out-degree distribution and an index of in-degree distribution for the time limit community with the largest number of contained nodes; and selecting a time limit community with the longest time window from the plurality of time limit communities, and establishing an index of timestamp distribution for the time limit community with the longest time window.
[0093] Since the ratio of the number of time sequence edges in different time limit communities is usually the same as the ratio of the number of nodes in the time limit communities, and the time limit community with the largest number of contained nodes has the largest scale and the most sampling in the plurality of time limit communities, the index of out-degree distribution and the index of in-degree distribution are established for the time limit community with the largest number of contained nodes, which can be migrated to other time limit communities with smaller scales and less sampling. The time limit community with the longest time window is the most active, and the index of timestamp distribution is established for the time limit community, so that when the index of timestamp distribution is used in any other time limit community, a median value can be first adopted from the index of timestamp distribution, and then the median value is linearly adjusted to the time window of the any other time limit community, thereby realizing the migration of the index of timestamp distribution from the time limit community with the longest time window to the time limit community with a shorter time window.
[0094] In this way, since the index structure is migratable between different time-limited communities, the index structure is only established for the time-limited community with the largest number of nodes and the time-limited community with the longest time window, and the index structure established can be reused by other time-limited communities; this enables the time-ordered edges in a large number of time-limited communities and between time-limited communities to be efficiently generated under specific distribution (i.e., out-degree distribution, in-degree distribution, and timestamp distribution) constraints.
[0095] For example, the specific type and parameters of the out-degree distribution π o , the in-degree distribution π i , and the timestamp distribution π t may be specified by the user according to requirements. By establishing the index of the out-degree distribution, the index of the in-degree distribution, and the index of the timestamp distribution that are migratable between different time-limited communities, the time-ordered edges that conform to the distribution specified by the user can be efficiently generated.
[0096] In step 304, the time-ordered graph of the target scenario is generated according to the nodes included in each time-limited community in the plurality of time-limited communities, the time window of each time-limited community in the plurality of time-limited communities, the time-ordered edges in each time-limited community in the plurality of time-limited communities, and / or the time-ordered edges between different time-limited communities in the plurality of time-limited communities.
[0097] In the embodiments of the present disclosure, the node set in the target scenario is grouped to obtain the nodes included in each time-limited community in the plurality of time-limited communities; the number of nodes included in the plurality of time-limited communities conforms to a power-law distribution; a time window is generated for each time-limited community in the plurality of time-limited communities; the starting time of the time window corresponding to the plurality of time-limited communities conforms to a uniform distribution, and the length of the time window corresponding to the plurality of time-limited communities conforms to a power-law distribution; an index structure that is migratable between different time-limited communities is constructed, and the time-ordered edges in each time-limited community in the plurality of time-limited communities and / or the time-ordered edges between different time-limited communities in the plurality of time-limited communities are generated based on the nodes included in each time-limited community, the time window of each time-limited community, and the index structure; and the time-ordered graph of the target scenario is generated according to the nodes included in each time-limited community in the plurality of time-limited communities, the time window of each time-limited community in the plurality of time-limited communities, the time-ordered edges in each time-limited community in the plurality of time-limited communities, and / or the time-ordered edges between different time-limited communities in the plurality of time-limited communities. In this way, through the node grouping stage, the time window binding stage, and the time-ordered edge generation stage, the time-ordered graph with time-limited communities is generated, wherein the number of nodes included in the time-limited community, the starting time of the time-limited community time window, and the length thereof all conform to specific distributions, and can reflect the actual network distribution. As an example, the user can specify the parameters of the specific distribution; and the time-ordered edges can be quickly generated based on the index structure that is migratable between different time-limited communities, so that the time-ordered graph with time-limited communities and conforming to the requirements of the user is generated in a flexible and efficient manner.
[0098] For example, Figure 5 A flowchart of a method for generating a time series graph with time-limited communities according to an embodiment of the present disclosure is shown. As Figure 5 As shown, in the node grouping stage, a user-specified number of nodes are grouped to obtain nodes included in each time-limited community in the plurality of time-limited communities. In the figure, only communities C1 and C2 in the plurality of time-limited communities are shown. Community C1 includes 6 nodes, and community C2 includes 3 nodes. In the time window binding stage, a time window is generated for each time-limited community in the plurality of time-limited communities obtained in the node grouping stage. The time window w1 of community C1 is represented as The time window w2 of community C2 is represented as Green represents within the scope of community C1, and the green dot is the node within community C1. Blue represents within the scope of community C2, and the blue dot is the node within community C2. In the time series edge stage, through the time series edge distribution model, the index of the degree distribution, the index of the in-degree distribution, and the index of the timestamp distribution are constructed, and the time series edges within each time-limited community in the plurality of time-limited communities obtained in the time window binding stage and the time series edges between different time-limited communities in the plurality of time-limited communities are generated. The green directed edge is the time series edge within community C1, the blue directed edge is the time series edge within community C2, and the red color represents outside the scope of community C1 and community C2. The red directed edge is the time series edge between community C1 and community C2. Thus, a time series graph containing time-limited communities (such as containing C1 and C2) is generated. The time series edge distribution model can implement the operation of the time series edge stage and is mainly used to simulate the user-specified distribution and generate a large number of time series edges. Due to the index structure constructed by the model, which can migrate between different time-limited communities, a time series edge conforming to the user-specified distribution can be efficiently generated in O(1) time.
[0099] Next, the three stages of generating a time series graph with time-limited communities described above are further described.
[0100] I. Node grouping stage (i.e., step 301).
[0101] Considering that there are often overlapping structures in real complex networks, the overlap between time-limited communities means that the same node can participate in different activities corresponding to multiple time-limited communities in different time windows, which reflects the behavior in various actual scenarios. For example, in an online discussion network, the same user can participate in multiple discussions on different issues; in a financial transfer network, some people may participate in multiple transactions; in an academic conference, core participants are more likely to engage in many academic activities.
[0102] In a possible implementation, the plurality of time-limited communities comprises a preset number of overlapping structures, wherein each overlapping structure comprises a shared node existing in two time-limited communities. In this way, when the node set in the target scenario is grouped, the number of nodes included in the plurality of time-limited communities conforms to a power-law distribution, and meanwhile, the overlapping structures between the time-limited communities are considered, so that the distribution of the plurality of time-limited communities is more consistent with the actual network.
[0103] Exemplarily, the number of overlapping structures (which can also be referred to as the number of overlapping relationships between time-limited communities) can be specified by a user according to requirements.
[0104] The degree of the shared node is greater than the degree of any other node in any of the two time-limited communities, and the ratio of the number of shared nodes to the number of nodes in the time-limited community is a preset value. The degree of the shared node can include the out-degree and the in-degree of the shared node, and in general, the out-degree and the in-degree of a node are positively correlated. Exemplarily, m overlapping structures of the form (i, j, Ω) can be generated, where i and j are the numbers of the two time-limited communities to which the overlapping structure belongs, Ω ∈ [0, 1] is a time-limited community overlap parameter, for example, 0.2, 0.5, etc., which is used to quantify the degree of overlap, and Ω is the preset value; if i < j, a node with a larger degree in time-limited community i is selected as the shared node of time-limited community i and time-limited community j, that is, the ratio of the number of shared nodes to the number of nodes in time-limited community i is Ω, so as to obtain an overlapping structure. Such an overlapping structure reflects the trend of nodes with high connectivity participating in multiple time-limited communities, which is consistent with the actual network.
[0105] II. Time window binding stage (i.e., step 302)
[0106] Figure 6 A flowchart for generating a time window for each time-limited community in the plurality of time-limited communities is shown according to an embodiment of the present disclosure, as shown in Figure 6 The method can include the following steps:
[0107] Step 601: Determine the expectation of the length of the time window of the first time-limited community according to the number of nodes included in the first time-limited community.
[0108] It is considered that the average value of the length of the time window of the time-limited community can be related to the number of nodes included in the time-limited community, and thus can affect the generation of the time window for each time-limited community. Exemplarily, data of network A is extracted from the Math Overflow website, and each time-limited community in the network A can be divided into 11 buckets according to the number of nodes |V| included in the time-limited community: Figure 7A diagram showing the average length of time windows within each bucket in network A according to an embodiment of the present disclosure. The average length of time windows within each bucket in network A is analyzed Figure 7 It is found that there is a logarithmic relationship between the average length of time windows of a temporal community and the number of nodes contained in the temporal community, which can be represented by the following equation (1):
[0109] avg(|w|) = b + a log(|V|) (1)
[0110] In equation (1), a and b are constants, |V| represents the number of nodes contained in a temporal community, and |w| represents the length of a time window of a temporal community. Exemplarily, the constants a = 766.5 and b = -1108.0 are calculated by linear regression; that is, Figure 7 The average length of time windows of a temporal community in network A shown in FIG. 1 and the number of nodes contained in the temporal community have a relationship: y = -1108.0 + 766.5 log2(x); where x represents the value of the number of nodes |V|, and y represents the value of the average length of time windows avg(|w|).
[0111] The logarithmic relationship shown in equation (1) is in line with intuition, that is, a larger-scale temporal community tends to be active for a longer time.
[0112] To generate the length of a time window of a temporal community containing a number of nodes |V|, the average value avg(|w|) of the length of a time window of the temporal community can be calculated using equation (1) above. According to the law of large numbers, the average value avg(|w|) of the length of a time window of the temporal community is equivalent to an estimate of the theoretical expectation .
[0113] In a possible implementation, the determining of the expectation of the length of a time window of the first temporal community according to the number of nodes contained in the first temporal community can include: calculating an average value of the length of a time window of the first temporal community according to the number of nodes contained in the first temporal community; wherein there is a logarithmic relationship between the average value of the length of a time window of the first temporal community and the number of nodes contained in the first temporal community; and determining the average value of the length of a time window of the first temporal community as the expectation of the length of a time window of the first temporal community. Exemplarily, the number of nodes |V| contained in the first temporal community can be substituted into equation (1) above to calculate the average value avg(|w|) of the length of a time window of the first temporal community; and the avg(|w|) can be taken as the expectation of the length of a time window of the first temporal community.
[0114] Step 602, according to the expectation of the time window length of the first time-limited community, determine the probability density function of the time window length of the first time-limited community.
[0115] Exemplarily, the expectation of the time window length |w| can be based on the expectation of the time window length |w| Further, the specific power-law distribution that the time window length |w| obeys is derived. For simplicity, the time window length |w| can be regarded as a continuous variable from 1 to T, and its probability density function π |w| (x) is as shown in the following formula (2):
[0116] π |w| (x) = α·x -η …………………………(2)
[0117] Wherein, x represents the value of the time window length, and the value range is 1 to T, T is the maximum value of the time window length; parameter η>1, used to control the falling speed of the probability density function, α is the normalization constant, satisfying The constant α can be represented by the following formula (3):
[0118]
[0119] Wherein, η is the parameter used to control the falling speed of the probability density function, and T is the maximum value of the time window length; thus, the expectation of the time window length |w| It can be shown as the following formula (4):
[0120]
[0121] Wherein, η is the parameter used to control the falling speed of the probability density function, and η is not equal to 1 or 2; T is the maximum value of the time window length. π |w| (x) is the probability density function, and |w| represents the time window length. The expectation of the time window length |w| After that, since formula (4) is monotonically increasing with respect to η, binary search can be performed to approximate η; then combined with formula (3), the probability density function π |w| (x) of the time window length |w| in formula (2) can be obtained, which is only related to the expectation of the time window length |w| The probability density function is the specific expression of the power-law distribution that the time window length obeys.
[0122] Exemplarily, based on the expectation of the length of the time window of the first time-limited community, the probability density function of the length of the time window of the first time-limited community in formula (2) can be obtained in combination with formula (3) and formula (4) above, and the probability density function is a specific expression of the power-law distribution to which the length of the time window of the first time-limited community conforms. Specifically, the value of avg(|w|) can be substituted into formula (4) to obtain the value of η, the value of η can be substituted into formula (3) to obtain the value of α, and the values of α and η can be substituted into formula (2) to obtain the probability density function.
[0123] Step 603: sampling to obtain a target time window length of the first time-limited community according to the probability density function of the length of the time window of the first time-limited community.
[0124] Exemplarily, the target time window length of the first time-limited community can be sampled according to the probability density function shown in formula (2) above; thereby achieving sampling of the length of the time window of the first time-limited community |w i | from a specified power-law distribution, where i represents the number of the first time-limited community; the sampling manner can be selected based on related technologies, which is not limited in the present application.
[0125] Step 604: sampling to obtain a starting time of a target time window of the first time-limited community according to the target time window length of the first time-limited community and a preset time range.
[0126] The preset time range represents the interval range of the time at which the nodes can interact, and the value thereof can be set by the user according to the requirement.
[0127] Exemplarily, the starting time of the target time window of the first time-limited community can be randomly sampled from a uniform distribution; where the upper and lower limits of the uniform distribution are respectively the earliest possible time in the network, the latest possible time in the network, and the time corresponding to the difference between the target time window length; thereby determining the starting position of the target time window of the first time-limited community on the time axis.
[0128] Step 605: determining the target time window of the first time-limited community based on the starting time of the target time window of the first time-limited community and the target time window length of the first time-limited community.
[0129] Exemplarily, the starting time of the target time window of the first time-limited community and the target time window length of the first time-limited community are summed to obtain the ending time of the target time window of the first time-limited community; the time period corresponding to the starting time and the ending time is the target time window.
[0130] In this way, by following steps 601-605 above, a reasonable time window is bound to each time-limited community.
[0131] In this embodiment, during the time window binding stage, the expected length of the time window for the first time-limited community is first determined by the number of nodes contained in the first time-limited community. This determines the probability density function of the time window length for the first time-limited community, i.e., the specific expression of the power-law distribution to which the time window length of the first time-limited community follows. Then, the time window length of the first time-limited community is randomly sampled from this power-law distribution, and the start time of the time window for the first time-limited community is randomly sampled from a uniform distribution. Finally, the time window for the first time-limited community is generated. In this way, the time window for each time-limited community is generated based on the patterns of the real dataset, meaning that the start time of the time window for each time-limited community follows a uniform distribution, the time window length follows a power-law distribution, and a logarithmic correlation is maintained between the average length of the time window for each time-limited community and the number of nodes contained in the time-limited community.
[0132] For example, Figure 8 A flowchart illustrating a timing graph generation method with time-limited communities according to an embodiment of the present disclosure is shown, as follows: Figure 8 As shown, obtain the number of time-limited communities n and the size of each time-limited community (i.e., the number of nodes it contains) {|V1|,…,|V n |};The result set W is initially an empty set, and the size of the i-th time-limited community is |V i Substituting into formula (1) above, we obtain the expected length of the time window for the i-th time-limited community. Using the above formulas (3) and (4), we can obtain the probability density function of the time window length of the i-th time-limited community. from The time window length |w of the i-th time-limited community is obtained by sampling. i |; and then the starting time t of the time window of the i-th time-limited community is obtained by sampling from the uniform distribution. s Thus, the time window w of the i-th time-limited community can be obtained. i =(t s ,t s +|w i |), and merge it into the result set W; in this way, traverse all n time-limited communities, repeat the above operation, obtain the time window of each time-limited community, and merge it into the result set W in turn.
[0133] III. Temporal Edge Connection Stage (i.e., Step 303)
[0134] The temporal edge connection stage can be divided into two parts: first, generating temporal edges within each time-limited community in multiple time-limited communities; and second, generating temporal edges between different time-limited communities in multiple time-limited communities.
[0135] Since each time sequence edge is composed of a source node, a target node and a time stamp, the three elements of the time sequence edge are limited in distribution during the generation of the time sequence edge; for example, first, for each source node u, the out-degree is assigned based on the index of the out-degree distribution; then, for each time sequence edge corresponding to the out-degree of the source node u, the target node v is determined based on the index of the in-degree distribution; finally, the time stamp of the time sequence edge between u and v is determined based on the index of the time stamp distribution. The specific types and parameters of the in-degree distribution, the out-degree distribution and the time stamp distribution can be specified by the user according to the requirements.
[0136] As an example, for the time sequence edges in each time limit community; since the time limit community has tightness in topology and time sequence, the nodes and time sequence edges in the same time limit community spontaneously follow a common distribution; thus, the time sequence edges in the time limit community can be generated by modeling the distribution.
[0137] Figure 9 A flow chart of a method for generating time sequence edges in each time limit community according to an embodiment of the present disclosure is shown as Figure 9 As shown, the method can include the following steps:
[0138] Step 901, generating a tree structure about the nodes contained in a first time limit community; wherein the first time limit community is any time limit community in the plurality of time limit communities.
[0139] For example, the tree structure about the nodes contained in the first time limit community can be generated by the existing tree structure generation method.
[0140] Step 902, determining the out-degree of a first source node based on the index of the out-degree distribution; wherein the first source node is any source node in the tree structure.
[0141] For example, the index of the out-degree distribution can be established for the time limit community containing the most nodes in the plurality of time limit communities. Therefore, if the first time limit community is the time limit community containing the most nodes in the plurality of time limit communities, the index of the out-degree distribution needs to be established for the first time limit community, and if the first time limit community is not the time limit community containing the most nodes in the plurality of time limit communities, the index of the out-degree distribution established for the time limit community containing the most nodes in the plurality of time limit communities can be directly reused.
[0142] The process of establishing the index of the out-degree distribution for the first time limit community will be described below when the first time limit community is the time limit community containing the most nodes in the plurality of time limit communities:
[0143] The out-degree d of the source node is generated o How to generate a time sequence edge from a given out-degree distributiono The problem of random sampling in the middle; when the out-degree distribution is π o For a continuous distribution, the out-degree distribution π can be analyzed. o Perform the discretization shown in formulas (5) and (6):
[0144]
[0145]
[0146] Among them, f o (x) is the discretized out-degree probability mass function, F o (x) represents the cumulative distribution function of the out-degree, π o Represents the out-degree distribution, (d o ) min and (d) o ) max They are respectively out-degree d o The minimum and maximum values of , where α is a constant, and Established.
[0147] Next, the out-degree can be generated using a threshold-based inverse transform sampling strategy. For example, this can be approximated by constructing an index structure as shown in Equation (7) below. That is, F o The inverse function of (x):
[0148] M o (y)=arg max x F o (x)≤y……………………(7)
[0149] in, This indicates that the probability values of the corresponding random variable are recorded. p represents any probability value; M o (y) records the value of the out-degree x for each unit increase in the probability value. Clearly, M... o (y) is about The linear approximation, when ∈→0 M o (y) is the index of the out-degree distribution; for example, setting upper and lower thresholds for parameter ∈ can help balance approximation accuracy and computational cost.
[0150] Furthermore, when determining the out-degree of the first source node based on the out-degree distribution index, in order to obtain the out-degree distribution π o Sampling can be performed by first sampling the probability p from the uniform distribution U(0,1), and then calculating the probability p and ∈ based on the probability p. By combining the index of the out-degree distribution shown in formula (7), the out-degree of the first source node can be obtained.
[0151] For example, Figure 10 Fig. 1 shows a schematic diagram of generating out-degree based on index of out-degree distribution according to an embodiment of the present disclosure, as Figure 10 As shown, the out-degree of the source node obeys power-law distribution with index -1.1, (d o ) min = 1, (d o ) max = 200, and index of the out-degree distribution ∈ = 0.005. Given a random probability p = 0.7052 obeying uniform distribution, based on the index of the out-degree distribution, an out-degree M o (0.7052) = 25 can be generated.
[0152] Since the tree structure about the nodes contained in the first time-limited community is generated in the above step 901, i.e., the generation of the tree structure precedes the establishment of the index of the out-degree distribution, thus, the number of time-series edges remaining to be generated can conflict with the given out-degree distribution, i.e., there is a relationship shown in formula (8):
[0153]
[0154] Wherein, n v represents the number of nodes in the first time-limited community, n e represents the number of time-series edges in the first time-limited community, π o represents the out-degree distribution, and α is a constant. In order to make the expectation of the out-degree d o match n e -n v , the maximum value of the out-degree (d o ) max can be adjusted.
[0155] Thus, after the index of the out-degree distribution is established for the first time-limited community, when the out-degree of the source node in other time-limited communities is determined, the index of the out-degree distribution established for the first time-limited community can be directly reused, without repeating the establishment in other time-limited communities.
[0156] Let n′ e and n′ v represent the number of time-series edges and the number of nodes in other time-limited communities, respectively, and there is Therefore, there is a relationship shown in formula (9):
[0157]
[0158] As can be seen from formula (9), the index of the out-degree distribution shown in formula (7) established for the first time-limited community has portability and can be directly applied to other time-limited communities without further adjustment. For example, the above Figure 10 The purple arrow in the middle indicates that the index of the out-degree distribution built for the large time-limited community (i.e., the time-limited community with the most nodes) can be reused by another small time-limited community (i.e., the time-limited community with relatively fewer nodes).
[0159] For example, Figure 11 This diagram illustrates a method for generating the out-degree of a first source node according to an embodiment of the present disclosure, as shown below. Figure 11 As shown, obtain the user-specified out-degree distribution π. o The number of nodes n in the first time-limited community v The number of time-series edges n in the first time-limited community e First, determine the degree distribution π. o If the index is not established, the distribution can be adjusted to match the number of time-series edges n in the first time-limited community. e and expected output Then, the out-degree distribution π is established using the above formulas (5)-(7). o The index; if an out-degree distribution π has already been established. o If the index is given, then the probability p is sampled from the uniform distribution U(0,1), and calculated. Then, through the established out-degree distribution π o The index is used to randomly generate the out-degree d of the first source node. o .
[0160] Step 903: Based on the index of the in-degree distribution, select the first target node corresponding to the first source node from the nodes included in the first time-limited community, wherein the number of the first target nodes is the same as the out-degree of the first source node.
[0161] For example, the in-degree distribution index can be built for the time-limited community with the most nodes among multiple time-limited communities. Therefore, if the first time-limited community is the time-limited community with the most nodes among multiple time-limited communities, then an in-degree distribution index needs to be built for the first time-limited community. If the first time-limited community is not the time-limited community with the most nodes among multiple time-limited communities, then the in-degree distribution index built for the time-limited community with the most nodes among multiple time-limited communities can be directly reused.
[0162] The following example illustrates the process of establishing an index for the in-degree distribution of the first time-limited community when the first time-limited community is the time-limited community with the largest number of nodes among multiple time-limited communities:
[0163] For example, nodes within a time-limited community can be numbered, and it is assumed that nodes with larger numbers tend to have higher out-degree and in-degree. The rationale for this assumption includes two aspects: first, the out-degree and in-degree of a node tend to match each other, and together they represent the importance of the node in the time-limited community; second, if the correlation between the out-degree or in-degree of a node and its number is not required, the current node number sequence can be mapped to other node permutations.
[0164] When selecting the target node for a temporal edge, if an in-degree threshold d is used... i To find the in-degree that does not exceed d i For any given node, the number of eligible in-degree nodes and the number of selected nodes are related, and both are related to d. i Increasing. Furthermore, the total number of selected nodes is equivalent to the number of nodes with the largest in-degree (d). i The node number of ).
[0165] The following section establishes the relationship between the cumulative in-degree sum and the target node number. Given the in-degree distribution π... i Calculate the probability mass function f with respect to the cumulative in-degree sum. si (x) and cumulative distribution function F si (x) is as follows:
[0166]
[0167] Among them, (d) i ) min and (d) i ) max They are respectively in-degree d i The minimum and maximum values, where α and β are constants, and α satisfies β satisfies
[0168] Establish the indices M1(y), M2(y), N1(y), N2(y) of the in-degree distribution shown in the following formula (12):
[0169]
[0170] in, d1 = arg max x F si (x)≤y,d2=arg min x F si (x)≥y,n v The parameter ∈ represents the number of nodes in the time-limited community. Setting upper and lower thresholds helps to balance approximate accuracy and computational cost.
[0171] Furthermore, given a probability p following a uniform distribution U(0,1), the corresponding node number can be linearly approximated by using the index of the in-degree distribution consisting of F1(y), F2(y), N1(y), and N2(y). The node represented by this number is the target node.
[0172] For example, Figure 12 This diagram illustrates a method for determining a target node according to an embodiment of the present disclosure, as shown below. Figure 12 As shown, the first time-limited community includes 100 nodes. For a given source node, a target node is selected from these 100 nodes. The in-degree of each node follows an adjusted exponent of -1.1, (d... i ) min =1、(d i ) max =10 power-law distribution, establish the index of the in-degree distribution shown in formula (12) around the first time limit community, ∈ =0.01. Given a random probability p = 0.646, calculate The value of y is 0.64. Substituting y = 0.64 into the in-degree distribution index yields F1(0.64), F2(0.64), N1(0.64), and N2(0.64), which can then be used to generate node numbers. That is, the 86th node in the first time limit community is taken as a target node.
[0173] Because different time-limited communities contain different numbers of nodes, the corresponding node number ranges also differ. Migrating the in-degree distribution index built around the first time-limited community to other time-limited communities requires additional target node number mapping to adapt to the different node number ranges. For example... Figure 12 As shown, target nodes are assigned to different buckets based on their desired in-degree. When the in-degree distribution index migrates from the first time-limited community (i.e., the time-limited community with the most nodes) to any hourly-limited community (i.e., the time-limited community with relatively fewer nodes), the number of nodes in each bucket decreases proportionally. Therefore, the original number obtained based on the in-degree distribution index can be scaled proportionally between the large time-limited community and the hourly-limited community to determine the corresponding number in that hourly-limited community. Figure 12 In a time-limited community comprising 80 nodes, if the original ID obtained from the index based on the in-degree distribution is 86, then calculate the product of the size ratio and the original ID. This will give you the required number 68, which means the 68th node in the hourly community will be used as a target node.
[0174] For example, Figure 13 A flowchart illustrating a method for generating a target node according to an embodiment of the present disclosure is shown, as follows: Figure 13 As shown, obtain the user-specified in-degree distribution π.i the number of nodes n of the time-limited community v the number of time edges n of the time-limited community e a candidate node set V i (i.e. the nodes in the time-limited community); when selecting a target node from a source node in the time-limited community, first determine whether the index of the in-degree distribution is established, if not, the distribution can be adjusted to match the number of time edges n of the time-limited community e and the expectation of in-degree Then, the index of the in-degree distribution π i is established by the above formula (10)-(12); if the index of the in-degree distribution π i has been established, a probability p is sampled from a uniform distribution U(0, 1), and is calculated i Then, the index of the in-degree distribution π is established, and is calculated to map the original number v, where N1(1.0) represents the value obtained by the index N1(y) of the in-degree distribution π i when y = 1.0, V i represents the candidate node set, and the candidate node represented by the mapped number in the candidate node set V i is the target node.
[0175] Step 904, based on the index of the timestamp distribution, generating a timestamp corresponding to the first target node from the time window of the first time-limited community.
[0176] Exemplarily, the index of the timestamp distribution can be established for the time-limited community with the longest time window among the plurality of time-limited communities. Therefore, if the first time-limited community is the time-limited community with the longest time window among the plurality of time-limited communities, the index of the timestamp distribution needs to be established for the first time-limited community, and if the first time-limited community is not the time-limited community with the longest time window among the plurality of time-limited communities, the index of the timestamp distribution established for the time-limited community with the longest time window among the plurality of time-limited communities can be directly reused.
[0177] The process of establishing the index of the timestamp distribution for the first time-limited community when the first time-limited community is the time-limited community with the longest time window among the plurality of time-limited communities will be exemplarily described as follows:
[0178] The timestamp distribution can reflect the specific pattern of the interaction between the source node and the target node over time. If the timestamp distribution π tThen, referring to the index generation method of the out-degree distribution in step 902, the index of the timestamp distribution can be established; for example, the timestamp distribution π can be established using the above formulas (5)-(7). t The index is not detailed here.
[0179] For example, Figure 14 A flowchart illustrating a method for generating a timestamp according to an embodiment of the present disclosure is shown, as follows: Figure 14 As shown, obtain the user-specified timestamp distribution π t The time window w = [t] in the time-limited community s ,t s +|w i First, determine whether the index of the timestamp distribution has been established. If not, the timestamp distribution π can be established using the above formulas (5)-(7). t The index; if there is an established timestamp distribution π t If the index is given, then the probability p is sampled from the uniform distribution U(0,1), and calculated. Based on the established timestamp distribution π t The index, from the timestamp distribution π t A median value t is sampled from the middle, and then... A linear mapping is applied to a time window w to obtain a randomly generated timestamp, where wt s Indicates the start time t of time window w s , π t .t max With π t .t min The upper boundary t of the time window for the time-limited community with the longest active time (i.e., the time-limited community with the longest time window) is denoted as t. max and lower boundary t min In this way, the index of timestamp distribution is migrated from time-limited communities with long active periods to time-limited communities with short active periods, and the activity intensity of these time-limited communities tends to have similar changing trends.
[0180] Step 905: Based on the first source node, the first target node, and the timestamp corresponding to the first target node, generate the time-series edge associated with the first source node within the first time-limited community.
[0181] For example, a first source node, any first target node, and the timestamp corresponding to the first target node can form a time-series edge; for any time-limited community, traversing all source nodes can generate time-series edges within that time-limited community.
[0182] Thus, by the steps 901-905, the time-series edges in each of the time-limited communities are generated based on the nodes contained in the time-limited community, the time window of the time-limited community, and the index structure.
[0183] As another example, time-series edges between time-limited communities can be further generated. Due to the closeness requirement, time-series edges between time-limited communities are usually sparse compared with time-series edges within a time-limited community. Thus, the out-degree of a node can be defined as i.e., the number of time-series edges not belonging to any time-limited community with the node as the source node; the out-degree of a node directly determines the number of time-series edges between time-limited communities.
[0184] Figure 15 A flow chart of a method for generating time-series edges between different time-limited communities is shown according to an embodiment of the present disclosure, as shown in FIG. 15. Figure 15 The method can include the following steps:
[0185] Step 1501, determine the out-degree of the first source node; wherein the out-degree represents the number of edges associated with the node not belonging to any time-limited community.
[0186] Exemplarily, the step 1501 can be performed after the step 905 in the method 1000 shown in FIG. 10. Figure 9
[0187] In a possible implementation, the number of time-series edges between different time-limited communities is determined by a preset chaos parameter, wherein the chaos parameter represents the clarity of the boundary between the different time-limited communities. In the process of determining the out-degree of the first source node, the out-degree can be adjusted by the chaos parameter, so as to adjust the number of time-series edges between different time-limited communities.
[0188] The probability mass function for the out-degree of a node is designed as follows
[0189]
[0190] wherein the constant c≥1, is the maximum value of , and δ∈[0, 1] is the chaos parameter of the time-limited community, and a satisfies The distribution has multiple advantages. Firstly, under the distribution, the time-limited community tends to be close. As the out-degree increases, the probability index decreases, so as to ensure that the probability of a node taking a high number is very small. Secondly, the distribution can control the number of time-series edges between time-limited communities, i.e., control the expected value of the distribution
[0191]
[0192]
[0193] wherein, As for the increment of δ, If and only if δ = 0. Thirdly, the distribution facilitates random sampling. For the first source node, a probability value p can be sampled from a uniform distribution U(0, 1), if p ≤ 1-δ, then take Otherwise, p > 1-δ, there is a relationship shown in equation (15):
[0194]
[0195] That is, the out-degree of the first source node can be obtained
[0196]
[0197] Step 1502, based on the index of the in-degree distribution, selecting a second target node corresponding to the first source node from the nodes contained in the plurality of temporal communities; wherein the number of the second target node is the same as the out-degree of the first source node, and the first source node and the second target node belong to different temporal communities.
[0198] The possible implementation in this step can refer to the related description in step 903 in the above Figure 9 .
[0199] Exemplarily, the index of the in-degree distribution can be established by the above equations (10)-(12). The way of selecting the second target node corresponding to the first source node can refer to the way of selecting the first target node corresponding to the first source node in step 903, which will not be repeated here. It should be noted that, unlike the selection of the first target node, the second target node should be selected from the nodes contained in the plurality of temporal communities.
[0200] Step 1503, based on the index of the timestamp distribution, generating a timestamp corresponding to the second target node from the complement of the intersection of the time window of the first temporal community and the time window of the temporal community where the second target node is located.
[0201] The possible implementation in this step can refer to the related description in step 904 in the above Figure 9 .
[0202] Exemplarily, the index of the timestamp distribution can be established by the above-mentioned formulas (5)-(7). The timestamp corresponding to the second target node can be generated in the same manner as the generation of the timestamp corresponding to the first target node in step 904, which will not be described herein again. It should be noted that, unlike the generation of the timestamp corresponding to the first target node, the timestamp corresponding to the second target node should be generated from the complement of the common part of the time window of the time-limited community where the first source node is located and the time window of the time-limited community where the second target node is located.
[0203] Step 1504, generating the time-ordered edge associated with the first source node between different time-limited communities based on the first source node, the second target node and the timestamp corresponding to the second target node.
[0204] In this way, through the above-mentioned steps 1501-1504, the time-ordered edges between different time-limited communities in the plurality of time-limited communities are generated based on the nodes contained in the time-limited communities, the time windows of the time-limited communities and the index structure.
[0205] Through the above-mentioned Figure 9 and Figure 16 The time-ordered edges in each time-limited community in the plurality of time-limited communities and the time-ordered edges between different time-limited communities in the plurality of time-limited communities can be generated, thereby completing the time-ordered edge generation phase.
[0206] For example, Figure 16 A flow chart of a method for generating time-ordered edges according to an embodiment of the present disclosure is shown as Figure 16 As shown in the figure, the number of nodes n v , the number of time-ordered edges n e , the number of time-limited communities n c , the out-degree distribution π o , the in-degree distribution π i , the timestamp distribution π t , the node set of each time-limited community V The time window of each time-limited community w The time-limited community confusion parameter δ; for the i-th time-limited community, a tree structure about the time-limited community nodes V i is generated to ensure connectivity. For each source node u in the i-th time-limited community, first, the time-ordered edge associated with u in the i-th time-limited community is generated. Specifically, the above-mentioned step 902 is called to sample the out-degree d o for the source node u by the sub-algorithm SampleForSource, and the above-mentioned step 903 is called to sample the target node v for the current time-ordered edge from the node set V i by the sub-algorithm SampleForTarget; the above-mentioned step 904 is called to generate the timestamp for the current time-ordered edge from the time window w iThe time-stamp t is sampled for the current temporal edge, thus generating a temporal edge (u, v, t). Then, the temporal edges between different time-limited communities associated with the source node u are generated; at this time, the target node v is selected from all possible nodes, and the time-stamp is selected from the complement set of the common time window of the source node u and the target node v; specifically, the out-degree of the source node u is obtained by using the above formula (16) The sub-algorithm SampleForTarget is called to perform the above step 1502 to sample the target node v' for the current temporal edge; the sub-algorithm SampleForTimestamp is called to perform the step 1503 to obtain the intersection set W of the common time window of the time-limited communities in which the source node u and the target node v' are located, and the time-stamp t' is sampled from the complement set of the intersection set W The time-stamp t' is sampled for the current temporal edge, thus generating a temporal edge (u, v', t'). Finally, the set E of the temporal edges within each time-limited community and between different time-limited communities can be obtained. In this way, the temporal edges within each time-limited community and between different time-limited communities are generated, wherein the temporal edges within each time-limited community satisfy the given out-degree distribution, in-degree distribution and time-stamp distribution constraints, and the number of the temporal edges between different time-limited communities is regulated by the time-limited community confusion parameter.
[0207] The following takes the academic discussion scenario as an example to generate a temporal graph in the academic discussion scenario by using the temporal graph generation method with time-limited communities in the above embodiment. First, the user-specified node number n v , the number of temporal edges n t , the number of time-limited communities n c , the out-degree distribution π o , the in-degree distribution π i , the time-stamp distribution π t , the community size power-law distribution parameter λ (the value of λ is the reciprocal of the value of the index in the power-law distribution), the number of overlapping relationships between time-limited communities m, the time-limited community overlapping parameter Ω, and the time-limited community confusion parameter δ, etc. For example, the user can specify ten thousand users participating in the discussion (i.e., the node number n v = 10000), one hundred discussion communities (i.e., the number of time-limited communities n c = 100), one hundred thousand temporal edges (i.e., the number of temporal edges n t = 100000), the out-degree distribution π o , the in-degree distribution π i all obey the power-law distribution (the index is -1.15), and the time-stamp distribution π tThe community size obeys a normal distribution (such as a normal distribution in the range of 0-1000), the parameter of the power-law distribution of the community size is 1.5, there are 50 overlapping time-limited communities with an overlapping degree of 0.3 (that is, the time-limited community overlapping relationship number m = 50, and the time-limited community overlapping parameter Ω = 0.3), the time-limited community confusion degree is 0.1 (that is, the time-limited community confusion parameter δ = 0.1), and the values of other parameters can be default values. First, in the node grouping stage, nodes are grouped into each time-limited community, so that the community size obeys a power-law distribution jointly influenced by user-specified parameters. For example, the nodes can be grouped according to the number of time-limited communities n c , the power-law distribution parameter λ, and the m overlapping relationships randomly generated, to obtain a node set of n c time-limited communities. Then, in the time window binding stage, an active time window is generated for each time-limited community. Further, in the time sequence edge stage, a time sequence edge distribution model is used to generate time sequence edges, and finally a time sequence graph G of academic discussion containing 10,000 nodes and 100 time-limited communities is obtained. The time sequence edge distribution model is a framework model that simulates user-specified distribution and efficiently generates time sequence edges by using an index structure. It only takes constant time to generate a time sequence edge under the index structure design of the time sequence edge distribution model. At the same time, since the index structure of the time sequence edge distribution model has the mobility between different time-limited communities, the index structure is only established for the time-limited community with the largest number of nodes and the time-limited community with the longest time window, which enables the efficient generation of a large number of time sequence edges within and between time-limited communities under the given distribution constraints. In the field of time sequence graph community discovery, it is very difficult to collect sufficient real data, and the number of time sequence edges in the real time sequence graph data set used by some existing community discovery technologies is often limited to the order of ten million. Since the existing time sequence graph generation method has some shortcomings, the synthetic time sequence graph data set used by some existing community discovery technologies is also limited to the scale of several thousand nodes and several hundred snapshots (that is, the projection graph of the time sequence graph at a certain timestamp). The time sequence graph generation method with time-limited communities provided by the embodiments of the present disclosure can generate billions of nodes and time sequence edges, thereby meeting the large-scale data requirements of time sequence graph community discovery technologies.
[0208] Based on the same inventive concept of the above method embodiments, the embodiments of the present disclosure also provide a time sequence graph generation device with time-limited communities, which can be used to execute the technical solutions described in the above time sequence graph generation method embodiments with time-limited communities.
[0209] Figure 17 A structural diagram of a time sequence graph generation device with time-limited communities according to an embodiment of the present disclosure is shown, as shown in Figure 17 The device includes:
[0210] The node grouping module 1701 is configured to group a node set in a target scene to obtain nodes included in each time-limited community in a plurality of time-limited communities; the time-limited community represents a community that is in an active state in a time period and finally goes to extinction; and the number of nodes included in the plurality of time-limited communities conforms to a power-law distribution.
[0211] The time window binding module 1702 is configured to generate a time window for each time-limited community in the plurality of time-limited communities; and the starting time of the time window corresponding to each time-limited community in the plurality of time-limited communities conforms to a uniform distribution, and the length of the time window corresponding to each time-limited community in the plurality of time-limited communities conforms to a power-law distribution.
[0212] The time sequence edge module 1703 is configured to construct an index structure that can migrate between different time-limited communities, and generate time sequence edges within each time-limited community in the plurality of time-limited communities and / or time sequence edges between different time-limited communities in the plurality of time-limited communities based on the nodes included in each time-limited community, the time window of each time-limited community, and the index structure.
[0213] The generation module 1704 is configured to generate a time sequence graph of the target scene according to the nodes included in each time-limited community in the plurality of time-limited communities, the time window of each time-limited community in the plurality of time-limited communities, the time sequence edges within each time-limited community in the plurality of time-limited communities, and / or the time sequence edges between different time-limited communities in the plurality of time-limited communities.
[0214] In the embodiments of the present disclosure, a node set in a target scene is grouped to obtain nodes contained in each time-limited community in a plurality of time-limited communities; the number of nodes contained in the plurality of time-limited communities conforms to a power-law distribution; a time window is generated for each time-limited community in the plurality of time-limited communities; wherein the starting time of the time window corresponding to the plurality of time-limited communities conforms to a uniform distribution, and the length of the time window corresponding to the plurality of time-limited communities conforms to a power-law distribution; an index structure that can migrate between different time-limited communities is constructed, and based on the nodes contained in each time-limited community, the time window of each time-limited community, and the index structure, a time sequence edge in each time-limited community in the plurality of time-limited communities and / or a time sequence edge between different time-limited communities in the plurality of time-limited communities is generated; and a time sequence graph of the target scene is generated according to the nodes contained in each time-limited community in the plurality of time-limited communities, the time window of each time-limited community in the plurality of time-limited communities, the time sequence edge in each time-limited community in the plurality of time-limited communities, and / or the time sequence edge between different time-limited communities in the plurality of time-limited communities. In this way, through the node grouping stage, the time window binding stage, and the time sequence edge stage, a time sequence graph with time-limited communities is generated through the three stages, wherein the number of nodes contained in the time-limited community, the starting time of the time window generated for the time-limited community, and the length thereof all conform to a specific distribution, and can reflect the real network distribution. As an example, a user can specify the parameters of the specific distribution; and the time sequence edge can be quickly generated based on the index structure that can migrate between different time-limited communities, so that the time sequence graph containing the time-limited community and meeting the user's requirements is generated in a flexible configuration and efficient manner.
[0215] In a possible implementation, the time sequence edge module is further configured to: select a time-limited community with the largest number of contained nodes from the plurality of time-limited communities, and establish an out-degree distribution index and an in-degree distribution index for the time-limited community with the largest number of contained nodes; select a time-limited community with the longest time window from the plurality of time-limited communities, and establish a timestamp distribution index for the time-limited community with the longest time window.
[0216] In a possible implementation, the time sequence edge module is further configured to: generate a tree structure about nodes contained in a first time limit community; the first time limit community is any time limit community in the plurality of time limit communities; determine an out-degree of a first source node based on the index of the out-degree distribution; the first source node is any source node in the tree structure; select first target nodes corresponding to the first source node from the nodes contained in the first time limit community based on the index of the in-degree distribution, where the number of the first target nodes is the same as the out-degree of the first source node; generate time stamps corresponding to the first target nodes from within the time window of the first time limit community based on the index of the time stamp distribution; and generate time sequence edges associated with the first source node within the first time limit community based on the first source node, the first target nodes, and the time stamps corresponding to the first target nodes.
[0217] In a possible implementation, the time sequence edge module is further configured to: determine an out-degree of the first source node; the out-degree represents the number of edges associated with a node that do not belong to any time limit community; select second target nodes corresponding to the first source node from the nodes contained in the plurality of time limit communities based on the index of the in-degree distribution; the number of the second target nodes is the same as the out-degree of the first source node, and the first source node and the second target nodes belong to different time limit communities; generate time stamps corresponding to the second target nodes from within a complement of a common part of a time window of a time limit community where the first source node is located and a time window of a time limit community where the second target node is located based on the index of the time stamp distribution; and generate time sequence edges associated with the first source node between different time limit communities based on the first source node, the second target nodes, and the time stamps corresponding to the second target nodes.
[0218] In a possible implementation, the number of time sequence edges between different time limit communities in the plurality of time limit communities is determined by a preset chaos parameter, where the chaos parameter represents the clarity of a boundary between the different time limit communities.
[0219] In a possible implementation, the time window binding module is further configured to: determine an expectation of the time window length of the first time-limited community according to the number of nodes included in the first time-limited community; determine a probability density function of the time window length of the first time-limited community according to the expectation of the time window length of the first time-limited community; sample a target time window length of the first time-limited community according to the probability density function of the time window length of the first time-limited community; sample a starting time of a target time window of the first time-limited community according to the target time window length of the first time-limited community and a preset time range; and determine the target time window of the first time-limited community based on the starting time of the target time window of the first time-limited community and the target time window length of the first time-limited community.
[0220] In a possible implementation, the time window binding module is further configured to: calculate a mean value of the time window length of the first time-limited community according to the number of nodes included in the first time-limited community; and determine the mean value of the time window length of the first time-limited community as the expectation of the time window length of the first time-limited community, where a logarithmic correlation exists between the mean value of the time window length of the first time-limited community and the number of nodes included in the first time-limited community.
[0221] In a possible implementation, the plurality of time-limited communities include a preset number of overlapping structures, where each overlapping structure includes a shared node existing in two time-limited communities, the degree of the shared node exceeds the degree of any other node in either of the two time-limited communities, and the ratio of the number of the shared nodes to the number of nodes in the either of the two time-limited communities is a preset value.
[0222] In some embodiments, the apparatus provided by the embodiments of the present application has functions or includes modules that can be used to perform the methods described in the above method embodiments, and the specific implementation can refer to the description of the above method embodiments. For brevity, they will not be described here.
[0223] The embodiments of the present application also provide a computer readable storage medium having computer program instructions stored therein, and the computer program instructions are executed by a processor to implement the above community life circle planning status evaluation method based on mobile phone signaling data. The computer readable storage medium can be a volatile or non-volatile computer readable storage medium.
[0224] The embodiments of the present application also provide an electronic device, including: a processor; a memory for storing processor-executable instructions; and wherein the processor is configured to implement the above community life circle planning status evaluation method based on mobile phone signaling data when executing the instructions stored in the memory.
[0225] The embodiment of the present application further provides a computer program product, comprising computer readable code or a nonvolatile computer readable storage medium carrying computer readable code, when the computer readable code is executed in a processor of an electronic device, the processor in the electronic device performs the community life circle planning present situation evaluation method based on mobile phone signaling data.
[0226] Figure 18 A block diagram of an electronic device 1900 according to an embodiment of the present application is shown. For example, the device 1900 can be provided as a server or terminal device. Referring to Figure 18 , the device 1900 includes a processing component 1922, which further includes one or more processors, and memory resources represented by a memory 1932, for storing instructions executable by the processing component 1922, such as application programs. The application programs stored in the memory 1932 can include one or more than one module each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute the instructions to perform the time sequence diagram generation method based on mobile phone signaling data with time-limited community.
[0227] The device 1900 can also include a power supply component 1926 configured to perform power management of the device 1900, a wired or wireless network interface 1950 configured to connect the device 1900 to a network, and an input output interface 1958 (I / O interface). The device 1900 can operate based on an operating system stored in the memory 1932, such as Windows Server TM , MacOS X TM , Unix TM , Linux TM , FreeBSD TM or the like.
[0228] The present disclosure can be a system, a method, and / or a computer program product. The computer program product can include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present disclosure.
[0229] Computer readable storage media can be tangible storage media which can retain and store instructions for use by an instruction execution device. Computer readable storage media can be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of computer readable storage media include the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
[0230] Computer readable program instructions described herein can be downloaded to respective computing / processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and / or a wireless network. The network can comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and / or edge servers. A network adapter card or network interface in each computing / processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing / processing device.
[0231] Computer readable program instructions for carrying out operations of the present disclosure can be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The computer readable program instructions can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate array (FPGA), or programmable logic array (PLA) can execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present disclosure.
[0232] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0233] These computer readable program instructions can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks. These computer readable program instructions can also be stored in a computer readable storage medium that can include random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other data storage device. When the computer readable program instructions are loaded into the computer and other programmable data processing apparatus, a series of operational steps are implemented that provide processes such that the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0234] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0235] The computer readable program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus or other device to produce a computer implemented process such that the instructions which execute on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in the flowchart and / or block diagram block or blocks.
[0236] Embodiments of the present disclosure have been described above, and the description is intended to be illustrative, and not restrictive, of the disclosed embodiments. Many modifications and variations of the described embodiments are possible, and all such modifications and variations are intended to be within the scope of the described embodiments. The description used herein is intended to best explain the principles of the various embodiments, the practical application, and the best mode of using the present disclosure, and to enable others skilled in the art to understand the disclosure, various embodiments, and the application, devices, and apparatuses.
Claims
1. A method for generating a time sequence diagram with a time-limited community, characterized in that, The method comprises: grouping a node set in a target scene to obtain nodes contained in each time-limited community in a plurality of time-limited communities; wherein the time-limited community represents a community that is in an active state within a period of time and eventually goes to extinction; the number of nodes contained in the plurality of time-limited communities conforms to a power-law distribution; generating a time window for each time-limited community in the plurality of time-limited communities; wherein the starting time of the time window corresponding to the plurality of time-limited communities conforms to a uniform distribution, and the length of the time window corresponding to the plurality of time-limited communities conforms to a power-law distribution; constructing an index structure that can migrate between different time-limited communities, and generating time sequence edges within each time-limited community in the plurality of time-limited communities and / or time sequence edges between different time-limited communities in the plurality of time-limited communities based on the nodes contained in each time-limited community, the time window of each time-limited community, and the index structure, wherein the index structure comprises an out-degree distribution index, an in-degree distribution index, and a timestamp distribution index; generating a time sequence graph of the target scene according to the nodes contained in each time-limited community in the plurality of time-limited communities, the time window of each time-limited community in the plurality of time-limited communities, the time sequence edges within each time-limited community in the plurality of time-limited communities, and / or the time sequence edges between different time-limited communities in the plurality of time-limited communities.
2. The method of claim 1, wherein, The construction of the index structure that can migrate between different time-limited communities comprises: selecting a time-limited community with the largest number of contained nodes from the plurality of time-limited communities, and establishing an out-degree distribution index and an in-degree distribution index for the time-limited community with the largest number of contained nodes; selecting a time-limited community with the longest time window from the plurality of time-limited communities, and establishing a timestamp distribution index for the time-limited community with the longest time window.
3. The method of claim 2, wherein, The generation of the time sequence edges within each time-limited community in the plurality of time-limited communities and / or the time sequence edges between different time-limited communities in the plurality of time-limited communities based on the nodes contained in each time-limited community, the time window of each time-limited community, and the index structure comprises: generating a tree structure related to nodes contained in a first time-limited community; wherein the first time-limited community is any time-limited community in the plurality of time-limited communities; determining the out-degree of a first source node based on the out-degree distribution index; wherein the first source node is any source node in the tree structure; selecting a first target node corresponding to the first source node from the nodes contained in the first time-limited community based on the in-degree distribution index, wherein the number of the first target node is the same as the out-degree of the first source node; generating a timestamp corresponding to the first target node from the time window of the first time-limited community based on the timestamp distribution index; generating a time sequence edge associated with the first source node within the first time-limited community based on the first source node, the first target node, and the timestamp corresponding to the first target node.
4. The method of claim 3, wherein, The generating the time sequence edges in each time-limited community and / or the time sequence edges between different time-limited communities in the plurality of time-limited communities based on the nodes comprised in each time-limited community, the time window of each time-limited community and the index structure further comprises: determining an out-degree of the first source node, wherein the out-degree represents a number of edges associated with the node and not belonging to any time-limited community; selecting a second target node corresponding to the first source node from the nodes comprised in the plurality of time-limited communities based on the index of the in-degree distribution, wherein the number of the second target nodes is the same as the out-degree of the first source node, and the first source node and the second target node belong to different time-limited communities; generating a time stamp corresponding to the second target node from a complement set of a common part of a time window of a time-limited community where the first source node is located and a time window of a time-limited community where the second target node is located based on the index of the time stamp distribution; generating a time sequence edge between different time-limited communities associated with the first source node based on the first source node, the second target node and the time stamp corresponding to the second target node.
5. The method of claim 4, wherein, The number of time sequence edges between different time-limited communities in the plurality of time-limited communities is determined by a preset chaos parameter, wherein the chaos parameter represents a degree of clarity of a boundary between the different time-limited communities.
6. The method of claim 1, wherein, The generating a time window for each time-limited community in the plurality of time-limited communities comprises: determining an expectation of a time window length of a first time-limited community according to a number of nodes comprised in the first time-limited community; determining a probability density function of the time window length of the first time-limited community according to the expectation of the time window length of the first time-limited community; sampling a target time window length of the first time-limited community according to the probability density function of the time window length of the first time-limited community; sampling a starting time of a target time window of the first time-limited community according to the target time window length of the first time-limited community and a preset time range; determining the target time window of the first time-limited community based on the starting time of the target time window of the first time-limited community and the target time window length of the first time-limited community.
7. The method of claim 6, wherein, The determining the expectation of the time window length of the first time-limited community according to the number of nodes comprised in the first time-limited community comprises: calculating a mean value of the time window length of the first time-limited community according to the number of nodes comprised in the first time-limited community, wherein there is a logarithmic correlation between the mean value of the time window length of the first time-limited community and the number of nodes comprised in the first time-limited community; determining the mean value of the time window length of the first time-limited community as the expectation of the time window length of the first time-limited community.
8. The method of claim 1, wherein, The plurality of time-limited communities comprises a preset number of overlapping structures, wherein each overlapping structure comprises a shared node existing in two time-limited communities, the degree of the shared node exceeds the degree of other nodes in any of the two time-limited communities, and the ratio of the number of the shared node to the number of nodes in the any of the two time-limited communities is a preset value.
9. A time sequence diagram generation apparatus with time-limited community, characterized by, The device comprises: a node grouping module configured to group a set of nodes in a target scenario to obtain nodes contained in each temporal community in a plurality of temporal communities; wherein the temporal community represents a community that is in an active state and eventually goes to extinction within a period of time; and the number of nodes contained in the plurality of temporal communities conforms to a power-law distribution; a time window binding module configured to generate a time window for each temporal community in the plurality of temporal communities; wherein the starting time of the time window corresponding to the plurality of temporal communities conforms to a uniform distribution, and the length of the time window corresponding to the plurality of temporal communities conforms to a power-law distribution; a time sequence edge module configured to construct an index structure that can migrate between different temporal communities, and generate time sequence edges within each temporal community in the plurality of temporal communities and / or time sequence edges between different temporal communities in the plurality of temporal communities based on the nodes contained in each temporal community, the time window of each temporal community, and the index structure; wherein the index structure comprises an out-degree distribution index, an in-degree distribution index, and a timestamp distribution index; a generation module configured to generate a time sequence graph of the target scenario based on the nodes contained in each temporal community in the plurality of temporal communities, the time window of each temporal community in the plurality of temporal communities, the time sequence edges within each temporal community in the plurality of temporal communities, and / or the time sequence edges between different temporal communities in the plurality of temporal communities.
10. An electronic device, comprising: comprise: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to implement the method of any one of claims 1 to 8 when executing the instructions stored in the memory.
Citation Information
Patent Citations
Close-contact crowd identification method and device, electronic equipment and storage medium
CN113035366A
Short-time community search method based on time span optimization
CN113424180A