Directed Graph Triangle Counting With Tagged Edge Directionality

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing triangle count methods for graph structure data are inefficient for directed graphs, leading to redundant calculations due to counting triangles multiple times, especially for vertices with many neighbors, and do not account for edge directionality.

Innovation Solution

A method for processing directed graphs by representing directed edges in a unified form and generating tagged edges to record original edge directions, allowing for accurate triangle category identification and feature vector generation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional triangle count methods are applied to directed graphs, then triangle counting can be performed, but redundant calculations occur and computing resources are wasted

Engineering Contradiction:
Improvetriangle counting efficiencyVSAvoidcomputing resource consumption
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent segments the triangle counting process by introducing tagged edges that categorize different triangle types (e.g., cyclic triangles, transitive triangles) based on edge directionality. This segmentation allows the algorithm to process different triangle categories separately, avoiding redundant calculations across all vertices.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary action by pre-tagging edges with directionality information before the triangle counting process. This preliminary tagging enables the algorithm to identify and skip certain triangle configurations that would otherwise require full processing, thereby reducing redundant computations.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If triangle counting is performed for each vertex in the graph, then complete triangle identification is achieved, but each triangle is counted three times causing considerable redundant calculations

Engineering Contradiction:
Improvetriangle identification accuracyVSAvoidcalculation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent introduces asymmetry by using directed edges with specific directionality tags instead of treating all edges symmetrically. This asymmetric approach allows the algorithm to establish a unique ordering for triangle identification, ensuring each triangle is counted exactly once rather than three times.

Inventive Principle:
Principle #4Asymmetry

Solution Approach 2:

The patent inverts the traditional approach by instead of counting all triangles from each vertex, it uses the tagged edge directions to determine a canonical representation of each triangle, counting it only from the appropriate starting vertex based on the inversion of the counting logic.

Inventive Principle:
Principle #13The other way round (Inversion)

3Device complexity

If edge directionality is not considered in triangle counting, then simpler algorithms can be used, but triangle categories caused by directionality cannot be identified

Engineering Contradiction:
Improvealgorithm complexityVSAvoidedge directionality information
Core Design Contradiction:
Device complexityVSLoss of information

Solution Approach 1:

The patent introduces tagged edges as an intermediary element that carries directionality information without complicating the core triangle counting logic. These tags act as mediators that preserve edge directionality information while enabling the algorithm to proceed with modified but not excessively complex processing.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent changes the parameter representation by adding directional tags to edges, transforming the graph representation from simple adjacency to tagged adjacency. This parameter change enables the algorithm to distinguish edge directions and identify triangle categories without requiring a complete redesign of the counting mechanism.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12585703B2Method and apparatus for processing graph data, device, storage medium, and program product
Publication Date: 2026.03.24 TENCENT TECHNOLOGY (SHENZHEN) CO LTD
  • US12585703B2 patent drawing
  • US12585703B2 patent drawing
  • US12585703B2 patent drawing

AI summary

A graph data processing method includes acquiring a directed graph, where a directed edge in the directed graph is represented as pointing to a destination vertex from a start vertex; representing the directed edge in a unified form according to a specified order between a vertex identifier of the start vertex and a vertex identifier of the destination vertex; generating a tagged edge for recording an original edge direction of the directed edge, to obtain a tagged directed graph; and identifying a category of a triangle constituted by a vertex in the tagged directed graph, a neighbor vertex of the vertex, and a common vertex commonly adjacent to the vertex and the neighbor vertex, based on tagged edges between two of the vertex, the neighbor vertex, and the common vertex.