Abstract
Finding similar string pairs is a critical but computationally expensive task in big data applications. This paper presents a parallel processing framework designed to optimize string similarity joins using edit distance. By introducing Para-Join for multi-core environments and Pada-Join for distributed Spark clusters, the framework employs intelligent partitioning and advanced filtering to minimize redundant computations. Experimental results demonstrate that Para-Join significantly outperforms existing state-of-the-art methods, while Pada-Join provides the necessary scalability for massive datasets that exceed single-machine memory limits.
Introduction
String similarity join—identifying all pairs of strings within a dataset that fall within a specific edit distance threshold—is foundational for data deduplication, entity resolution, and bioinformatics. However, the $O(N^2)$ complexity of naive comparisons makes it a bottleneck for large-scale data. While existing algorithms like Pass-Join and Part-Join offer improvements through prefix-filtering, they often fail to fully leverage modern parallel hardware or handle datasets that exceed local memory. This research addresses these limitations by proposing a framework that balances workload distribution with computational efficiency.
Methodology: The Para-Join and Pada-Join Framework
The proposed framework operates through a three-stage pipeline designed to maximize parallelism while ensuring result completeness.
1. Intelligent Data Partitioning
Rather than simple random distribution, the input strings are divided into disjoint subsets based on their joint frequency and interval distributions. This strategy ensures that strings with a high probability of being similar are grouped together, facilitating more effective filtering.
2. Filter-Verification and Pruning
To avoid the high cost of calculating exact edit distances for every pair, the framework employs a multi-layered filtering approach:
- Length and Position Filtering: Quickly discards pairs whose length difference exceeds the threshold $\tau$.
- Advanced Pruning: A novel pruning strategy further narrows the candidate set, reducing the number of pairs that require expensive verification.
3. Parallel Implementation
The framework is implemented in two distinct versions:
- Para-Join (Multi-core): Utilizes multi-threading on a single machine. It employs a "cycling alternation" method to compare subsets, ensuring every potential pair is checked exactly once without redundancy.
- Pada-Join (Distributed): Built on Apache Spark, this version uses Resilient Distributed Datasets (RDDs) and broadcast variables to manage data across a cluster. This approach circumvents the "memory wall" encountered by single-machine algorithms when processing millions of strings.
Experimental Evaluation
The framework was tested against four real-world datasets, including author titles, query logs, URLs, and DNA sequences.
Performance and Scalability
On a dataset of approximately 860,000 strings with an edit distance threshold of 8, Para-Join completed the join in 49 seconds, compared to 136 seconds for Pass-Join. The performance gap widened as the threshold increased, highlighting the effectiveness of the new pruning strategies. Furthermore, Para-Join demonstrated near-linear speedup as thread counts increased, though overhead eventually plateaus.
Overcoming Memory Constraints
For datasets exceeding one million strings (such as the URL and DNA datasets), traditional single-machine algorithms frequently crashed due to memory overflow. Pada-Join successfully processed these datasets by distributing the memory load across the Spark cluster. However, for smaller datasets, Para-Join remains the faster choice due to the lack of network communication overhead inherent in Spark.
Conclusion
This research provides a robust solution for large-scale string similarity joins. By combining intelligent partitioning with parallel execution models tailored for both multi-core and distributed systems, the proposed framework offers significant speedups and handles data scales previously unreachable by single-node implementations. Future work will focus on further reducing Spark's communication overhead and extending the framework to support additional similarity metrics.
Summary updated