高级检索

    自适应优先搜索树的函数式建模、验证及访问优化

    Functional Modeling, Verification and Access Optimization of Adaptive Priority Search Tree

    • 摘要: 优先搜索树(priority search tree,PST)是一种融合搜索树与优先队列特性的数据结构,能够在保持搜索树最坏查找效率的基础上,根据数据的优先级判断其重要性,从而实现高优先级数据的快速检索。Nipkow等人对采用静态优先级机制的PST进行了形式化建模与机械化验证,为其理论分析奠定了重要基础。然而,在访问分布高度偏斜的场景下,静态机制易导致检索效率下降。为此,提出一种基于动态优先级思想的函数式自适应优先搜索树(functional adaptive priority search tree,FAPST),与PST相比,FAPST在通过函数式建模与机械化验证确保正确性的同时,能够根据访问分布特征动态调整数据优先级,在维持树结构平衡性与可控最坏查找效率的前提下,有效优化访问敏感数据的查找性能。进一步,针对实际应用中热点数据随时间变化的特点,引入热点转移机制,通过优先级衰减策略提升新热点响应速度,缓解旧热点固化问题。实验评估表明,在访问敏感场景和热点转移场景下,经过形式化验证的FAPST通过动态优先级和热点转移机制有效优化了查询效率,较PST关键函数调用次数分别缩短64.8%、46.3%。

       

      Abstract: The priority search tree (PST) is a data structure that combines the characteristics of search trees and priority queues, enabling efficient retrieval of high-priority elements while maintaining worst-case search efficiency comparable to that of search trees. Nipkow et al. further modeled and mechanized the verification of PST with a static priority mechanism, laying an important foundation for its formal analysis and subsequent theoretical exploration. However, static priority mechanisms can lead to degraded performance under highly skewed access distributions, limiting their applicability in practice. To overcome this limitation, a functional adaptive priority search tree (FAPST) is proposed. FAPST adopts dynamic priority adjustment based on access frequency and is formally modeled and verified at the formal level to ensure functional correctness and reliability. This structure preserves balance and worst-case efficiency while adaptively responding to access patterns, thereby significantly improving the retrieval of frequently accessed elements. To further address the shifting nature of data hotspots in practical scenarios, a hotspot migration mechanism is introduced. This mechanism incorporates a priority decay strategy to accelerate responses to emerging hotspots and mitigate the stagnation of outdated ones. Experimental results demonstrate that, in both access-sensitive and hotspot-shifting workloads, the formally verified FAPST achieves notable reductions in the number of key function calls of 64.8% and 46.3% respectively, compared to conventional PSTs.

       

    /

    返回文章
    返回