SHARP:面向序列模式高效匹配的共享状态缩减
SHARP: Shared State Reduction for Efficient Matching of Sequential Patterns
AI总结:
SHARP 通过模式共享度(PSD)抽象实现模式间状态共享与状态缩减,在延迟界限下以常数时间选择部分匹配子集,从而在 CEP、OLAP 和 RAG 场景中实现高效尽力而为的序列模式匹配。
摘要:
数据中序列模式的检测是现代数据处理系统中复杂事件处理(CEP)、OLAP 和检索增强生成(RAG)的一项基本功能。在实践中,模式匹配具有挑战性,因为常见应用依赖大量模式,并且需要在严格的延迟界限内进行评估。同时,匹配需要维护状态,即中间结果,其规模随输入大小呈指数增长。因此,系统转向尽力而为处理,力求在延迟界限下实现最大召回率。然而,现有技术孤立地考虑每个模式,忽视了模式匹配中状态共享所带来的优化潜力。在本文中,我们提出 SHARP,一个利用状态缩减实现高效尽力而为模式匹配的库。为此,SHARP 通过一种新的抽象——称为模式共享度(PSD)——在模式之间引入状态共享。在运行时,该抽象有助于对部分模式匹配进行分类和索引。基于此,一旦超过延迟界限,SHARP 通过在常数时间内选择部分匹配的子集进行进一步处理来实现尽力而为处理。在使用真实世界数据的实验中,在平均处理延迟 50% 的界限下,SHARP 在 CEP、OLAP 和 RAG 应用中的模式匹配分别实现了 97%、96% 和 73% 的召回率。
英文摘要:
The detection of sequential patterns in data is a basic functionality of modern data processing systems for complex event processing (CEP), OLAP, and retrieval-augmented generation (RAG). In practice, pattern matching is challenging, since common applications rely on a large set of patterns that shall be evaluated with tight latency bounds. At the same time, matching needs to maintain state, i.e., intermediate results, that grows exponentially in the input size. Hence, systems turn to best-effort processing, striving for maximal recall under a latency bound. Existing techniques, however, consider each pattern in isolation, neglecting the optimization potential induced by state sharing in pattern matching. In this paper, we present SHARP, a library that employs state reduction to achieve efficient best-effort pattern matching. To this end, SHARP incorporates state sharing between patterns through a new abstraction, coined pattern-sharing degree (PSD). At runtime, this abstraction facilitates the categorization and indexing of partial pattern matches. Based thereon, once a latency bound is exceeded, SHARP realizes best-effort processing by selecting a subset of partial matches for further processing in constant time. In experiments with real-world data, SHARP achieves a recall of 97%, 96% and 73% for pattern matching in CEP, OLAP, and RAG applications, under a bound of 50% of the average processing latency.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。