A SQL statement template dynamic updating method, device, equipment and storage medium

By constructing a dynamic statement template sequence library using the longest common subsequence algorithm, the problems of low efficiency and poor stability in SQL statement clustering and deduplication in existing technologies are solved, and efficient and stable parsing and clustering deduplication of complex SQL statements are achieved.

CN119396850BActive Publication Date: 2026-07-24SHUI YOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHUI YOU INFORMATION TECH CO LTD
Filing Date
2024-11-21
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently and stably cluster and deduplicate SQL statements. Condition parameter traversal methods are incomplete and inefficient, while tree-structured recursive methods consume large amounts of memory and are prone to stack overflow.

Method used

A dynamic statement template sequence library is constructed using the longest common subsequence algorithm. SQL statement templates are identified and extracted by the longest common subsequence, and the template sequence is dynamically updated to adapt to complex SQL statements, thereby achieving efficient and stable clustering and deduplication.

Benefits of technology

It achieves simple, efficient and stable parsing of various SQL statements, adapts to constantly changing SQL data streams, and completes clustering and deduplication.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396850B_ABST
    Figure CN119396850B_ABST
Patent Text Reader

Abstract

The application discloses a SQL statement template dynamic updating method and device, equipment and storage medium, relates to the field of databases, and comprises the following steps: constructing a to-be-matched template sequence of a to-be-processed SQL statement; determining the longest common subsequence between each statement template sequence and the to-be-matched template sequence, determining a target statement template sequence from all statement template sequences based on all the longest common subsequences; if the sequence length of the longest common subsequence corresponding to the target statement template sequence is greater than or equal to a preset sequence length threshold, updating the target statement template sequence to the corresponding longest common subsequence in a dynamic statement template sequence library; and if the sequence length of the longest common subsequence corresponding to the target statement template sequence is less than the preset sequence length threshold, adding the to-be-matched template sequence to the dynamic statement template sequence library as a new statement template sequence. The application realizes updating of the dynamic statement template sequence library of the SQL statement.
Need to check novelty before this filing date? Find Prior Art