Index-based method, device and computer equipment for dense subgraph query of time sequence diagram

By constructing a three-level progressive index structure with both label and time dimensions, the high response latency and high storage cost of time-series graph k-core queries in large-scale social networks are solved, enabling efficient and accurate community detection and event tracking.

CN122903664BActive Publication Date: 2026-11-24HUNAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611387136.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-09-08
Publication Date
2026-11-24
Estimated Expiration
2046-09-08

AI Technical Summary

Technical Problem

Traditional time-series graph k-core query schemes suffer from high query response latency in large-scale, tag-rich social networks, excessive index storage space and construction costs, and cannot meet the needs of high-frequency, multi-condition community retrieval. Furthermore, existing methods cannot track the dynamic evolution of tagged user communities.

Method used

A time-series graph dense subgraph query method based on index is constructed. It adopts a three-level progressive index structure (VLT-Index, RLT-Index, ALT-Index) with labels and time as dimensions. By dynamically maintaining the incremental number of vertex cores, the index construction overhead is reduced and storage space is compressed, adapting to different query efficiencies and storage space requirements.

Benefits of technology

It enables efficient and accurate community detection and event tracking in social networks, reduces index building costs and space usage, and supports flexible querying in large-scale time series graph application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903664B_ABST
    Figure CN122903664B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, and computer device for querying dense subgraphs of temporal graphs based on indexes. The method includes: obtaining a temporal node label graph corresponding to a social network; constructing a first index structure, a second index structure, and a third index structure based on the temporal node label graph, using an incremental method that dynamically maintains the number of vertex kernels by adjusting the time window; receiving a query request, selecting a matching index structure according to the query efficiency and storage space requirements of the query request, and performing a retrieval in the matching index structure according to the query request to obtain a kernel-dense subgraph that simultaneously satisfies label constraints and time window constraints; and outputting the set of user nodes corresponding to the kernel-dense subgraph. This method can effectively control the index construction cost and space occupation while ensuring the query efficiency of dense subgraphs with dual constraints, and can be widely applied to scenarios such as community detection, event tracking, and anomaly monitoring in social networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to an index-based method, apparatus, and computer device for querying dense subgraphs of time-series graphs. Background Technology

[0002] With the development of social network analytics, time-series dense subgraph query technology has gradually become a core supporting technology for applications such as user community identification, group behavior tracking, and hot topic mining. This technology can quickly locate highly active user groups within a specific time period by mining k-core dense subgraphs that satisfy connectivity constraints within a specified time window. In real social networks, each user node typically carries semantic tags such as interest areas, occupational attributes, and geographical characteristics. These tags encode the user's core features and are the key basis for achieving refined community segmentation and accurate group analysis.

[0003] However, traditional k-core query schemes for time-series graphs mostly focus on computations based on the graph's topological structure and time dimension. If a method is used to first filter user nodes by target labels and then perform online core decomposition on the filtered time-series subgraphs, each query requires real-time construction of the corresponding label set's time-series induced subgraph and execution of the complete core decomposition operation. In social networks with large user bases and diverse label types, query response latency increases rapidly with the number of labels and user scale, failing to support high-frequency, multi-condition community retrieval needs. If a naive indexing scheme is used that pre-computes all label combinations and time windows corresponding to query results, the index's storage space and construction cost increase quadratically with the number of timestamps and exponentially with the number of label categories. Since user labels in social networks are often numerous and dynamically iterating, this indexing scheme faces extremely high storage and maintenance overhead, making it unsuitable for large-scale social network applications. Meanwhile, existing label-constrained community search methods are mostly designed for static social networks and cannot be directly used to track the dynamic evolution of labeled user communities under different time windows. Summary of the Invention

[0004] Therefore, it is necessary to provide an index-based method, apparatus, and computer device for querying dense subgraphs of time-series graphs, addressing the aforementioned technical problems.

[0005] A time-series graph dense subgraph query method based on index, the method comprising: Obtain the time-series node label graph corresponding to the social network; the time-series node label graph includes several user nodes, each user node carries an attribute label, and a time-series edge is set between every two user nodes that have interactive behavior, and each time-series edge carries a corresponding interaction timestamp; Based on the aforementioned temporal node label graph, an incremental approach is adopted to dynamically maintain the number of vertex cores over a time window, constructing a first index structure, a second index structure, and a third index structure. The first index structure stores the minimum required label set and the corresponding minimum active time interval for each user node at the granularity of a single user node. The second index structure stores the minimum span endpoint and the corresponding user node set at the granularity of label constraints and start time. The third index structure utilizes the hierarchical nesting relationship of cores to store the set of temporal label-dominant vertices. Receive a query request, the query request including a target label set, a target time window, and a vertex connectivity threshold corresponding to the kernel degree; Based on the query efficiency and storage space requirements corresponding to the query request, a matching index structure is selected. The query request is then searched within the matching index structure to obtain a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints. The connectivity of each vertex in the kernel dense subgraph is not lower than the vertex connectivity threshold. Output the set of user nodes corresponding to the kernel dense subgraph.

[0006] An index-based time-series graph dense subgraph query apparatus, the apparatus comprising: The graph acquisition module is used to acquire the time-series node label graph corresponding to the social network. The time-series node label graph includes several user nodes, each user node carries an attribute label, and a time-series edge is provided between every two user nodes that have interactive behavior. Each time-series edge carries a corresponding interaction timestamp. The index construction module is used to construct a first index structure, a second index structure, and a third index structure based on the temporal node label graph, using an incremental method of dynamically maintaining the number of vertex cores by adjusting the time window. The first index structure stores the minimum required label set and the corresponding minimum active time interval for each user node at the granularity of a single user node. The second index structure stores the minimum span endpoint and the corresponding user node set at the granularity of label constraints and start time. The third index structure stores the set of vertices dominated by temporal labels using the hierarchical nesting and inclusion relationship of cores. The request acquisition module is used to receive query requests, which include a target label set, a target time window, and a vertex connectivity threshold corresponding to the kernel. The index query module is used to select a matching index structure based on the query efficiency and storage space requirements corresponding to the query request, and to perform a retrieval in the matching index structure according to the query request to obtain a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints; the connectivity of each vertex in the kernel dense subgraph is not lower than the vertex connectivity threshold. The result output module is used to output the set of user nodes corresponding to the kernel dense subgraph.

[0007] A computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program performing the following steps: Obtain the time-series node label graph corresponding to the social network; the time-series node label graph includes several user nodes, each user node carries an attribute label, and a time-series edge is set between every two user nodes that have interactive behavior, and each time-series edge carries a corresponding interaction timestamp; Based on the aforementioned temporal node label graph, an incremental approach is adopted to dynamically maintain the number of vertex cores over a time window, constructing a first index structure, a second index structure, and a third index structure. The first index structure stores the minimum required label set and the corresponding minimum active time interval for each user node at the granularity of a single user node. The second index structure stores the minimum span endpoint and the corresponding user node set at the granularity of label constraints and start time. The third index structure utilizes the hierarchical nesting relationship of cores to store the set of temporal label-dominant vertices. Receive a query request, the query request including a target label set, a target time window, and a vertex connectivity threshold corresponding to the kernel degree; Based on the query efficiency and storage space requirements corresponding to the query request, a matching index structure is selected. The query request is then searched within the matching index structure to obtain a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints. The connectivity of each vertex in the kernel dense subgraph is not lower than the vertex connectivity threshold. Output the set of user nodes corresponding to the kernel dense subgraph.

[0008] The aforementioned index-based method, apparatus, and computer device for querying dense subgraphs in time-series graphs, by constructing a three-level progressive index structure with both label and time dimensions, can support dense subgraph queries with both label constraints and time window constraints. It employs an incremental approach to dynamically maintain the number of vertex cores as the time window adjusts, significantly reducing the computational overhead of index construction. The three levels of indexes are adapted to different query efficiencies and storage space requirements, allowing for a flexible trade-off between query performance and space overhead. The third-level index utilizes the hierarchical nesting of cores to store the dominant vertices of the time-series labels, greatly compressing index storage space and adapting to large-scale time-series graph applications. This invention effectively controls index construction costs and space usage while ensuring the efficiency of dense subgraph queries with dual constraints, and can be widely applied to scenarios such as community detection, event tracking, and anomaly monitoring in social networks. Attached Figure Description

[0009] Figure 1 This is a flowchart illustrating an index-based time-series graph dense subgraph query method in one embodiment; Figure 2Here is an example of a time-series node label graph; Figure 3 This is a schematic diagram of the process of index-based time-series graph double-constraint subgraph query in a specific embodiment; Figure 4 This is a schematic diagram of the VLT-Index data structure in one embodiment; Figure 5 This is a schematic diagram of the RLT-Index data structure in one embodiment; Figure 6 This is a schematic diagram of the ALT-Index data structure in one embodiment; Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0010] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0011] In one embodiment, such as Figure 1 As shown, an index-based method for querying dense subgraphs in time-series graphs is provided, including the following steps: Step 1: Obtain the temporal node label graph corresponding to the social network. The temporal node label graph includes several user nodes, each user node carries an attribute label, and a temporal edge is set between every two user nodes that have interactive behavior. Each temporal edge carries a corresponding interaction timestamp.

[0012] A temporal node label graph is a structured modeling form of user interaction relationships in a social network. User nodes correspond to a single user account in the social network, attribute labels correspond to semantic attribute identifiers such as user interests, occupation, and region, temporal edges correspond to an interaction behavior between two users, and the interaction timestamp corresponds to the specific time when the interaction occurred.

[0013] like Figure 2 The example of a timing node label diagram shown can be represented as follows: ,in: For the set of vertices, Indicates the total number of vertices; This is a set of temporal edges, where each edge is... Form, representing vertices With vertex In timestamp There is an interactive relationship. Indicates the total number of time-series edges; For each vertex, there is a set of vertex labels. Carry a tag ; For the set of all timestamps, Represents the maximum timestamp. Based on a time-series node label graph. Query tag set Query time window (in , ), and integers TDLKQ queries need to return results within the time window. Internal, belonging to the label The set of k-core vertices of the subgraph induced by the vertices.

[0014] Step 2: Based on the temporal node label graph, an incremental approach is adopted to dynamically maintain the number of vertex cores over a time window, constructing a first index structure, a second index structure, and a third index structure. The first index structure stores the minimum required label set and the corresponding minimum active time interval for each user node, using a single user node as the granularity. The second index structure stores the minimum span endpoint and the corresponding user node set, using label constraints and start time as the granularity. The third index structure utilizes the hierarchical nesting relationship of cores to store the set of temporal label-dominant vertices.

[0015] The vertex core count corresponds to the number of effective neighbors of a social network user within a specified time and tag range, and is a core indicator for measuring the tightness of user connections. The incremental construction method refers to updating only the affected vertex core count during time window adjustments, without repeating full core calculations for each window. The first index structure stores data at the granularity of a single user node. Its minimum required tag set is the minimum combination of attribute tags needed for a user to reach the corresponding core count, and the minimum active time interval is the shortest time range for a user to maintain the corresponding core count. The second index structure elevates the storage granularity to the combined dimension of tag constraints and start time. Its minimum span endpoint is the earliest end time required for a user to reach the target core count given a start time and tag constraints. The third index structure utilizes the hierarchical nesting and inclusion relationship of cores for data compression. This hierarchical nesting and inclusion relationship means that a dense subgraph with higher kernel density is necessarily contained within a dense subgraph with lower kernel density, and time-series tag-dominant vertices are user nodes that can be covered by higher-level index entries and do not need to be stored repeatedly.

[0016] Understandably, this step, through a three-level progressive index design, can balance query efficiency and storage space overhead in social network scenarios. The basic index ensures the integrity of query results, the query optimization index can significantly improve the response speed of high-frequency queries, and the space compression index can significantly reduce index storage space in social networks with large user scale and many tag dimensions. At the same time, the unified incremental construction method can avoid repeatedly performing full calculations for each tag and time combination, greatly reducing the index construction cost.

[0017] Step 3: Receive a query request, which includes the target label set, the target time window, and the vertex connectivity threshold corresponding to the kernel.

[0018] The target tag set is the range of user semantic attributes specified during the query, corresponding to user features that need to be filtered in a social network scenario, such as specific interests or specific professional groups. The target time window is the range of interaction time specified during the query, corresponding to the specific time period to be analyzed. Kernel degree, or vertex connectivity threshold, is a quantitative requirement for the tightness of connections within a dense subgraph, corresponding to the minimum number of interactive neighbors required for community members in a social network.

[0019] Step 4: Select a matching index structure based on the query efficiency and storage space requirements corresponding to the query request. Perform a search within the matching index structure according to the query request to obtain a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints. The connectivity of each vertex in the kernel dense subgraph is not lower than the vertex connectivity threshold.

[0020] Kernel-dense subgraphs are subgraphs that simultaneously satisfy label constraints, time window constraints, and vertex connectivity requirements. They correspond to highly interactive and tightly knit user communities with specified attributes within a specified time period in social network scenarios, where each user in the community has at least a threshold number of neighbors from the same community.

[0021] Understandably, this step allows for flexible selection of the appropriate index structure based on actual business needs, enabling efficient queries in different application scenarios of social networks. For low-frequency, small-scale analysis, the first index structure can be used to ensure the comprehensiveness of the results; for real-time queries with high timeliness requirements, the second index structure can be used to shorten response latency; and for large-scale full data analysis, the third index structure can be used to control resource consumption. Ultimately, it can quickly and accurately locate closely interacting user groups that meet the criteria.

[0022] Step 5: Output the set of user nodes corresponding to the kernel dense subgraph.

[0023] The set of user nodes is the user entity corresponding to the dense subgraph that meets all query conditions, which corresponds to the target community member identified in the social network.

[0024] It is understandable that this step outputs a standardized set of users, which can be directly integrated into subsequent business applications of social networks, such as community recommendations, precision marketing, and risk group identification, thereby improving the efficiency and accuracy of subsequent business decisions.

[0025] The aforementioned index-based dense subgraph query method for time-series graphs utilizes a three-level progressive index structure with both label and time dimensions. This structure supports dense subgraph queries with both label and time window constraints. The method employs an incremental approach to dynamically maintain the number of vertex cores as the time window adjusts, significantly reducing the computational overhead of index construction. The three levels of indexes are adapted to different query efficiencies and storage space requirements, allowing for a flexible trade-off between query performance and space overhead. The third-level index utilizes the hierarchical nesting of cores to store the dominant vertices of the time-series labels, greatly compressing index storage space and adapting to large-scale time-series graph applications. This invention effectively controls index construction costs and space usage while ensuring efficient dense subgraph queries with dual constraints, making it widely applicable to scenarios such as community detection, event tracking, and anomaly monitoring in social networks.

[0026] In one specific embodiment, the first index structure is specifically VLT-Index (Vertex Label-Time Index), the second index structure is specifically RLT-Index (Required Label-Time Index), and the third index structure is specifically ALT-Index (Advanced Label-Time Index), as follows: Figure 3 The diagram illustrates a flowchart of a time-series graph double-constraint subgraph query based on an index, specifically including: Step 1 (Basic Index Construction): Based on the vertex labels and timestamp information in the temporal node label graph, construct the VLT-Index. This index maintains a "MinimalRequiredLabelSet" (MRL) and its corresponding "MinimalActiveTimeInterval" (MAI) for each vertex and each k value. The VLT-Index can correctly answer TDLKQ queries, but it requires traversing the time intervals of all vertices during the query, which is inefficient on large-scale graphs.

[0027] The second step (query optimization index construction): Constructing the RLT-Index. The RLT-Index improves the storage granularity from "per vertex" to "per label constraint and start time," directly storing the minimum span endpoint (MSE) and its corresponding vertex set. This index can quickly locate vertices that meet the conditions during a query using binary search, significantly improving query efficiency, but it has a larger space overhead.

[0028] Step 3 (Spatial Compressed Index Construction): Construct ALT-Index. ALT-Index utilizes the hierarchical nesting relationship of k-cores and employs a compression strategy of "Temporal-LabelDominantVertex" to retain only the set of dominant vertices, significantly reducing space usage while ensuring query efficiency.

[0029] Step 4 (Query Processing): Receive user query requests Based on actual needs, select the corresponding index structure to execute the query and return a set of k-core vertices that satisfy the label constraints and time window constraints.

[0030] Wherein, given vertex Time window and integers If there exists a set of tags Satisfy: ① belong ① k-core; ② no k-core exists. Make belong The k-core is called As vertices exist The minimum required set of labels for a given vertex. Tag collection and integers If a time window exists Satisfy: ① belong ① k-core; ② no k-core exists. Make belong The k-core is called As vertices exist The next minimum active time interval.

[0031] In one embodiment, the construction of a first index structure, a second index structure, and a third index structure based on the temporal node label graph, using an incremental method of dynamically maintaining the vertex core count with time window adjustments, includes: enumerating all non-empty subsets from the attribute labels carried by each user node in the temporal node label graph to obtain multiple label sets, each label set containing at least one attribute label; enumerating all starting time points from the interaction timestamps carried by each temporal edge in the temporal node label graph; for each label set and each starting time point, determining the widest time window with the starting time point as the left boundary and the maximum interaction timestamp of the temporal node label graph as the right boundary, extracting the temporal edges corresponding to the user nodes carrying the label sets, constructing a temporal induced subgraph, and calculating the initial vertex core count of each user node; from the widest... At the start of the time window, the right boundary is gradually shrunk from the maximum interaction timestamp towards the starting time point. Each shrunk results in a current time window. Each time, temporal edges outside the right boundary of the current time window are removed, and the vertex core count of each user node is incrementally updated. When the vertex core count of a user node decreases, the current time window before this shrunk is recorded as the minimum active time interval under the tag set corresponding to the user node. The corresponding tag set is determined as the minimum required tag set, and index entries of the first index structure are generated. The entire time window shrunk process corresponding to all tag sets and all starting time points is traversed to obtain the complete first index structure. Based on the first index structure, the storage granularity is increased, and the second index structure is progressively constructed. Based on the second index structure, vertex redundancy compression is performed, and the third index structure is progressively constructed.

[0032] In this embodiment, as Figure 4 The diagram shows the data structure of the VLT-Index, where each vertex represents a VLT-Index. Each integer And for each minimum required tag set (MRL), maintain a time window sequence. Each time window It must be a vertex. exist The minimum active time interval (MAI) is determined. Time windows under the same k corresponding to the MRL are sorted in ascending order of their start time. The VLT-Index is constructed using an incremental algorithm based on dynamic core maintenance, with the following specific steps: Step S101: Enumerate all non-empty label sets and all start times .

[0033] Step S102: From the widest time window Begin by constructing the time-series label-induced subgraph under this window. .

[0034] Step S103: Call the core decomposition algorithm to calculate The core number of all vertices in the array is denoted as . .

[0035] Step S104: Let from Decrease to For each Perform the following sub-steps: Step S104a: Delete the timestamp. Update the induced subgraph to include all edges. .

[0036] Step S104b: Call the DeleteMaintenance algorithm to update the core count of each vertex, and obtain... .

[0037] Step S104c: For each vertex ,Compare and : like Then for each from arrive , window Insert into In the context of the current vertex, MRL represents the current vertex. The minimum required set of labels determined during the decrease in the number of cores.

[0038] Step S104d: Update The window becomes .

[0039] Step S105: Process the narrowest window Insert the remaining core information into the index.

[0040] Step S106: Execute compression rules on the constructed index: if it already exists and If the record already covers the current candidate (i.e., the candidate does not provide new minimum information), then skip the candidate; otherwise, remove all candidates that meet the requirements. and Insert the old record and then insert the new record.

[0041] Step S107: Output the complete VLT-Index.

[0042] In one embodiment, the step of progressively constructing a second index structure by increasing the storage granularity based on the first index structure includes: using each set of minimum required labels and each start time point in the first index structure as a combination dimension, aggregating the storage granularity from a single user node to a combination granularity of label constraints and start time; for all user nodes under each combination dimension, extracting the minimum end time that satisfies the corresponding vertex core number for each user node to obtain the minimum span endpoint; arranging all minimum span endpoints under the same combination dimension in descending order of time, and grouping and storing all user nodes corresponding to each minimum span endpoint to generate the second index structure.

[0043] In this embodiment, based on VLT-Index, the present invention further defines the concept of the minimum span endpoint. The minimum span endpoint is the earliest end time required for a user node to reach the target number of vertex kernels under the corresponding start time and label constraints. Specifically, it is defined as: given a vertex Tag collection Integer and start time ,like It is the smallest timestamp, making belong The k-core is called As vertices exist The minimum span endpoint below.

[0044] like Figure 5 The diagram shows the data structure of the RLT-Index, where each RLT-Index represents a different MRL and each integer. and each start time Store a key-value pair set consisting of the minimum span endpoint (MSE) and the corresponding set of vertices. Each of them For the vertex at The minimum span endpoint below, For all satisfied The set of vertices. Same Below, items are arranged by Sort in ascending order, within the same MRL by Sort in ascending order, same Press down Sort in descending order. The construction of RLT-Index uses the same dynamic core maintenance framework as VLT-Index, and the specific steps are as follows: Step S301: Enumerate all non-empty tag sets and all start times .

[0045] Step S302: From the widest time window Begin by constructing the time-series label-induced subgraph under this window. .

[0046] Step S303: Call the core decomposition algorithm to calculate The core number of all vertices in the array is denoted as . .

[0047] Step S304: Let from Decrease to For each Perform the following sub-steps: Step S304a: Delete the timestamp. Update the induced subgraph to include all edges. .

[0048] Step S304b: Call the DeleteMaintenance algorithm to update the core count of each vertex, and obtain... .

[0049] Step S304c: For each vertex ,Compare and : like Then for each from arrive , will vertex Insert into In the middle, the corresponding endpoints are That is, inserting a record .

[0050] Step S304d: Execute compression rules: if already exists and The corresponding record has covered the vertex. If the candidate meets the criteria, skip it; otherwise, remove all candidates that meet the criteria. and In the old record of the vertex The appearance of a new record is then used to insert a new record. .

[0051] Step S304e: Update The window becomes .

[0052] Step S305: Process the narrowest window Insert the remaining core information into the index.

[0053] Step S306: Output the complete RLT-Index.

[0054] In one embodiment, the step of performing vertex redundancy compression on the basis of the second index structure to progressively construct the third index structure includes: based on the data of the second index structure, verifying for each user node whether there is an index record in the second index structure that meets the criteria for determining the dominance of time-series labels; the criteria for determining the dominance of time-series labels are that the kernel degree corresponding to the index record is higher than the current kernel degree, the label set corresponding to the index record is a subset of the current minimum required label set, the time window corresponding to the index record contains the current time window, and the user node satisfies the kernel dense subgraph condition under the kernel degree, label set, and time window corresponding to the index record; if satisfied, the user node is determined to be a dominant vertex of time-series labels, and the corresponding record of the user node under the current combination is removed; the set of dominant vertices of time-series labels under each combination is retained to generate the third index structure.

[0055] In this embodiment, to reduce space overhead while maintaining efficient querying, the present invention further defines the concept of a temporal label-dominant vertex. Given a vertex... Integer MRL and time window ,like belong k-core, and there is no k-core. ,any Any time window satisfy , , making belong of -core, then it is called The dominant vertex is the one with the time sequence label.

[0056] like Figure 6 The diagram shows the data structure of ALT-Index. ALT-Index represents each integer. Each minimum required tag set and each time window Store the dominant vertex set whose time-series label is stored. Index by Sort in ascending order, within the same MRL by Sort in ascending order, same Press down Sort in ascending order, same Press down Sort in ascending order. The construction of ALT-Index uses the same dynamic core maintenance framework as VLT-Index and RLT-Index, the difference being that it stores the dominant vertices instead of all vertices. The specific steps are as follows: Step S501: Enumerate all non-empty tag sets and all start times .

[0057] Step S502: From the widest time window Begin by constructing the time-series label-induced subgraph under this window. .

[0058] Step S503: Call the core decomposition algorithm to calculate The number of cores at all vertices in the equation.

[0059] Step S504: Let from Decrease to For each Perform the following sub-steps: Step S504a: Delete the timestamp. Update the induced subgraph to include all edges. .

[0060] Step S504b: Call the DeleteMaintenance algorithm to update the core count of each vertex, and obtain... .

[0061] Step S504c: For each vertex ,Compare and : like Then for each lost ,examine Has it been already by a certain , , , The vertex block is contained within the new candidate. If it is already contained, skip the candidate; otherwise, remove all old vertex blocks dominated by the new candidate and... Insert into middle.

[0062] Step S504d: Update The window becomes .

[0063] Step S505: Process the narrowest window Insert the dominant vertex into the index.

[0064] Step S506: Output the complete ALT-Index.

[0065] In one embodiment, selecting a matching index structure based on the query efficiency and storage space requirements corresponding to the query request includes: selecting a first index structure when the query frequency of the query request is lower than a preset frequency threshold and the number of user nodes in the time-series node label graph is lower than a first quantity threshold; selecting a second index structure when the response latency requirement of the query request is higher than a preset latency threshold and the number of user nodes in the time-series node label graph is between the first quantity threshold and a second quantity threshold; and selecting a third index structure when the number of user nodes in the time-series node label graph is higher than the second quantity threshold and the number of dimensions of the attribute labels is higher than a preset dimension threshold.

[0066] In one embodiment, retrieving a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints in a matching index structure according to the query request includes: when matching a first index structure, enumerating all minimum required label sets contained in the target label set; traversing all user nodes corresponding to each minimum required label set, verifying whether the minimum active time interval corresponding to each user node is completely contained within the target time window; collecting all user nodes that meet the verification conditions to form a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints.

[0067] In this embodiment, the query method based on VLT-Index includes the following steps: Step S201: Receive query request ,in .

[0068] Step S202: Enumerate all non-empty minimum required tag sets These MRLs are in the index for a given There are records.

[0069] Step S203: For each enumerated MRL, find its corresponding vertex. and the MAI list of the vertex under the MRL .

[0070] Step S204: For each vertex ,examine Does there exist a time interval? satisfy If it exists, then... Add to answer set .

[0071] Step S205: Process all Then, return the answer set. That is, the set of user nodes corresponding to the kernel dense subgraph that simultaneously satisfies the label constraint and the time window constraint, which constitutes all the vertices of the kernel dense subgraph.

[0072] The space complexity of the VLT-Index is . The query time complexity is This represents a significant improvement over online methods. Among them, The number of vertices. For the number of k-core layers, The average number of MRLs per vertex, For each The average number of MAIs under the given conditions.

[0073] In one embodiment, retrieving a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints by searching a matching index structure according to the query request includes: when matching a second index structure, enumerating all minimum required label sets contained in the target label set; locating the list of entries corresponding to the start time of the target time window for each minimum required label set; filtering entries in the list of entries by binary search where the minimum span endpoint is no later than the end time of the target time window; and merging the user node sets corresponding to all entries that meet the conditions to form a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints.

[0074] In this embodiment, the query method based on RLT-Index includes the following steps: Step S401: Receive query request ,in .

[0075] Step S402: Enumerate all non-empty minimum required tag sets .

[0076] Step S403: For each enumerated MRL, retrieve Stored in A list of key-value pairs.

[0077] Step S404: For each MRL, collect all lists that satisfy the following conditions. The set of vertices in the entries .

[0078] Step S405: Take the union of all collected vertex sets to obtain the answer set. .

[0079] Step S406: Return the answer set That is, the set of user nodes corresponding to the kernel dense subgraph that simultaneously satisfies the label constraint and the time window constraint, which constitutes all the vertices of the kernel dense subgraph.

[0080] The space complexity of RLT-Index is . The query time complexity is This significantly improves query efficiency compared to VLT-Index. Specifically, The average number of vertices corresponding to each MSE For each The average number of MSEs under the following conditions This represents the average number of MRLs checked during a query. The size of the answer set.

[0081] In one embodiment, retrieving a kernel-dense subgraph that satisfies both label constraints and time window constraints in a matching index structure according to the query request includes: when matching a third index structure, enumerating all minimum required label sets contained in the target label set, and all kernel degree values ​​not lower than the vertex connectivity threshold; retrieving the temporal label-dominant vertex set whose start time is not earlier than the start time of the target time window and whose end time is not later than the end time of the target time window; and merging all temporal label-dominant vertex sets that meet the conditions to form a kernel-dense subgraph that satisfies both label constraints and time window constraints.

[0082] In this embodiment, the query method based on ALT-Index includes the following steps: Step S601: Receive query request ,in .

[0083] Step S602: Enumerate each minimum required tag set and each integer .

[0084] Step S603: For each Combine and retrieve data stored in the ALT-Index. Entries, conditions are and .

[0085] Step S604: Collect the set of vertices in all entries that meet the conditions as candidates.

[0086] Step S605: Take the union of all candidate vertex sets to obtain the answer set. .

[0087] Step S606: Return the answer set That is, the set of user nodes corresponding to the kernel dense subgraph that simultaneously satisfies the label constraint and the time window constraint, which constitutes all the vertices of the kernel dense subgraph.

[0088] The space complexity of ALT-Index is... The query time complexity is This significantly reduces space usage while maintaining efficient querying. The average number of times each vertex appears in all dominant vertex sets. This represents the average number of vertices that need to be traversed for each output vertex during a query.

[0089] In one embodiment, the method further includes: obtaining the old timestamp corresponding to the third index structure, determining the expiration time window with the old timestamp as the right boundary; deleting all time-series label dominant vertex set records corresponding to the expiration time window in the third index structure; retaining the valid index records corresponding to the time interval after the old timestamp, and updating the time window auxiliary structure of the third index structure.

[0090] In this embodiment, the present invention also provides an index maintenance method for updating the ALT-Index when time-series graph data undergoes temporal evolution, i.e., deleting edges and their corresponding index records within the expired time window. The specific steps are as follows: Step S701: Obtain the old timestamp of the existing ALT-Index The expired time windows that need to be deleted are... .

[0091] Step S702: Delete all index entries with expiration time windows. The relevant part is to remove the index records corresponding to expired edges within that time window.

[0092] Step S703: Retain the time range after the expired timestamp. This avoids rebuilding the indexed records.

[0093] Step S704: Update the qualified time window and related auxiliary structures.

[0094] Step S705: Output the updated ALT-Index.

[0095] The above maintenance method only requires deleting the index records corresponding to expired edges and updating the affected parts, without having to rebuild the entire dataset, thus effectively reducing maintenance costs.

[0096] It should be understood that, although Figure 1 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 1At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0097] In one embodiment, an index-based time-series graph dense subgraph query apparatus is provided, comprising: The graph acquisition module is used to acquire the time-series node label graph corresponding to the social network. The time-series node label graph includes several user nodes, each user node carries an attribute label, and a time-series edge is provided between every two user nodes that have interactive behavior. Each time-series edge carries a corresponding interaction timestamp. The index construction module is used to construct a first index structure, a second index structure, and a third index structure based on the temporal node label graph, using an incremental method of dynamically maintaining the number of vertex cores by adjusting the time window. The first index structure stores the minimum required label set and the corresponding minimum active time interval for each user node at the granularity of a single user node. The second index structure stores the minimum span endpoint and the corresponding user node set at the granularity of label constraints and start time. The third index structure stores the set of vertices dominated by temporal labels using the hierarchical nesting and inclusion relationship of cores. The request acquisition module is used to receive query requests, which include a target label set, a target time window, and a vertex connectivity threshold corresponding to the kernel. The index query module is used to select a matching index structure based on the query efficiency and storage space requirements corresponding to the query request, and to perform a retrieval in the matching index structure according to the query request to obtain a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints; the connectivity of each vertex in the kernel dense subgraph is not lower than the vertex connectivity threshold. The result output module is used to output the set of user nodes corresponding to the kernel dense subgraph.

[0098] Specific limitations regarding the index-based time-series graph dense subgraph query apparatus can be found in the limitations of the index-based time-series graph dense subgraph query method described above, and will not be repeated here. Each module in the aforementioned index-based time-series graph dense subgraph query apparatus can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0099] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The network interface is used to communicate with external terminals via a network connection. When executed by the processor, the computer program implements an index-based time-series graph dense subgraph query method. The display screen can be a liquid crystal display (LCD) or an e-ink display. The input devices can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device casing, or an external keyboard, touchpad, or mouse.

[0100] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0101] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps of the method described above.

[0102] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0103] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A time-series graph dense subgraph query method based on index, characterized in that, The method includes: Obtain the time-series node label graph corresponding to the social network; the time-series node label graph includes several user nodes, each user node carries an attribute label, and a time-series edge is set between every two user nodes that have interactive behavior, and each time-series edge carries a corresponding interaction timestamp; Based on the aforementioned temporal node label graph, an incremental approach is adopted to dynamically maintain the number of vertex cores over a time window, constructing a first index structure, a second index structure, and a third index structure. The first index structure stores the minimum required label set and the corresponding minimum active time interval for each user node at the granularity of a single user node. The second index structure stores the minimum span endpoint and the corresponding user node set at the granularity of label constraints and start time. The third index structure utilizes the hierarchical nesting relationship of cores to store the set of temporal label-dominant vertices. Receive a query request, the query request including a target label set, a target time window, and a vertex connectivity threshold corresponding to the kernel degree; Based on the query efficiency and storage space requirements corresponding to the query request, a matching index structure is selected. The query request is then searched within the matching index structure to obtain a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints. The connectivity of each vertex in the kernel dense subgraph is not lower than the vertex connectivity threshold. Output the set of user nodes corresponding to the kernel dense subgraph; The construction of the first, second, and third index structures based on the temporal node label graph, using an incremental method of dynamically maintaining the number of vertex cores with a time window adjustment, includes: From the attribute labels carried by each user node in the time-series node label graph, enumerate all non-empty subsets to obtain multiple label sets, each label set containing at least one attribute label; All starting time points are enumerated from the interaction timestamps carried by each temporal edge in the temporal node label graph. For each set of tags and each starting time point, the widest time window is determined with the starting time point as the left boundary and the maximum interaction timestamp of the temporal node tag graph as the right boundary. Temporal edges corresponding to user nodes carrying the set of tags are extracted, a temporal induced subgraph is constructed, and the initial number of vertex kernels for each user node is calculated. Starting from the widest time window, the right boundary is gradually shrunk from the maximum interaction timestamp toward the starting time point. Each shrunk results in a current time window. Each time, the temporal edge outside the right boundary of the current time window is removed, and the vertex core count of each user node is incrementally updated. When the number of vertex cores of a user node decreases, the current time window before this contraction is recorded as the minimum active time interval under the tag set corresponding to the user node, the corresponding tag set is determined as the minimum required tag set, and an index entry of the first index structure is generated. By iterating through all the time window contraction processes corresponding to all label sets and all starting time points, a complete first index structure is obtained. Based on the first index structure, the storage granularity is increased, and a second index structure is progressively constructed; based on the second index structure, vertex redundancy compression is performed, and a third index structure is progressively constructed.

2. The method according to claim 1, characterized in that, The step of progressively constructing a second index structure by increasing the storage granularity based on the first index structure includes: Using each set of minimum required tags and each start time point in the first index structure as the combination dimension, the storage granularity is aggregated from a single user node to a combined granularity of tag constraints and start time. For all user nodes under each of the aforementioned combined dimensions, extract the minimum end time for each user node that satisfies the corresponding vertex kernel number to obtain the minimum span endpoint; All minimum span endpoints under the same combined dimension are sorted in descending order of time, and all user nodes corresponding to each minimum span endpoint are grouped and stored to generate a second index structure.

3. The method according to claim 2, characterized in that, The step of performing vertex redundancy compression on the basis of the second index structure and progressively constructing the third index structure includes: Based on the data of the second index structure, each user node is checked to see if there is an index record in the second index structure that meets the time-series label-dominated judgment condition. The time-series label-dominated judgment condition is that the kernel degree corresponding to the index record is higher than the current kernel degree, the label set corresponding to the index record is a subset of the current minimum required label set, the time window corresponding to the index record contains the current time window, and the user node satisfies the kernel dense subgraph condition under the kernel degree, label set and time window corresponding to the index record. If the condition is met, the user node is determined to be the dominant vertex of the time sequence label, and the corresponding record of the user node in the current combination is removed. Retain the dominant vertex set under each combination of temporal labels to generate a third index structure.

4. The method according to claim 1, characterized in that, The index structure selected based on the query efficiency and storage space requirements corresponding to the query request includes: When the query frequency of a query request is lower than a preset frequency threshold and the number of user nodes in the time-series node label graph is lower than a first quantity threshold, the first index structure is selected. When the response latency requirement of the query request is higher than the preset latency threshold and the number of user nodes in the time-series node label graph is between the first and second quantity thresholds, the second index structure is selected. When the number of user nodes in the time sequence node label graph exceeds the second quantity threshold and the number of dimensions of attribute labels exceeds the preset dimension threshold, the third index structure is selected.

5. The method according to claim 1, characterized in that, Based on the query request, a retrieval is performed in the matching index structure to obtain a kernel-dense subgraph that simultaneously satisfies both label constraints and time window constraints, including: When matching the first index structure, enumerate all the minimum required tag sets contained in the target tag set; Iterate through all user nodes corresponding to each minimum required tag set and verify whether the minimum active time interval corresponding to each user node is completely contained within the target time window. Collect all user nodes that meet the verification conditions and form a kernel dense subgraph that simultaneously satisfies the label constraint and the time window constraint.

6. The method according to claim 1, characterized in that, Based on the query request, a retrieval is performed in the matching index structure to obtain a kernel-dense subgraph that simultaneously satisfies both label constraints and time window constraints, including: When matching the second index structure, enumerate all the minimum required tag sets contained in the target tag set; Locate the list of entries corresponding to the minimum required set of labels and the start time of the target time window; In the list of entries, a binary search is used to filter out entries whose minimum span endpoint is no later than the end time of the target time window; Merge the sets of user nodes corresponding to all entries that meet the conditions to form a kernel dense subgraph that simultaneously satisfies the label constraint and the time window constraint.

7. The method according to claim 1, characterized in that, Based on the query request, a retrieval is performed in the matching index structure to obtain a kernel-dense subgraph that simultaneously satisfies both label constraints and time window constraints, including: When matching the third index structure, enumerate all the minimum required label sets contained in the target label set, and all kernel degree values ​​that are not lower than the vertex connectivity threshold; Retrieve the set of dominant vertices with time-series labels whose start time is no earlier than the start time of the target time window and whose end time is no later than the end time of the target time window; Merge all sets of dominant vertices with time-series labels that meet the conditions to form a kernel dense subgraph that satisfies both label constraints and time window constraints.

8. A time-series graph dense subgraph query apparatus based on an index and applied to the method of any one of claims 1-7, characterized in that, The device includes: The graph acquisition module is used to acquire the time-series node label graph corresponding to the social network. The time-series node label graph includes several user nodes, each user node carries an attribute label, and a time-series edge is provided between every two user nodes that have interactive behavior. Each time-series edge carries a corresponding interaction timestamp. The index construction module is used to construct a first index structure, a second index structure, and a third index structure based on the temporal node label graph, using an incremental method of dynamically maintaining the number of vertex cores by adjusting the time window. The first index structure stores the minimum required label set and the corresponding minimum active time interval for each user node at the granularity of a single user node. The second index structure stores the minimum span endpoint and the corresponding user node set at the granularity of label constraints and start time. The third index structure stores the set of vertices dominated by temporal labels using the hierarchical nesting and inclusion relationship of cores. The request acquisition module is used to receive query requests, which include a target label set, a target time window, and a vertex connectivity threshold corresponding to the kernel. The index query module is used to select a matching index structure based on the query efficiency and storage space requirements corresponding to the query request, and to perform a retrieval in the matching index structure according to the query request to obtain a kernel dense subgraph that simultaneously satisfies label constraints and time window constraints; the connectivity of each vertex in the kernel dense subgraph is not lower than the vertex connectivity threshold. The result output module is used to output the set of user nodes corresponding to the kernel dense subgraph.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Streaming graph-oriented privacy protection sub-graph matching method and system

    CN118484818A

  • Dynamic server load balancing method for high-concurrency online games

    CN122679103A