A data query method and device, electronic equipment and storage medium

By acquiring natural language recognition semantics and generating optimized prompts to optimize statements, the problem of low database query accuracy and high manual maintenance costs in existing technologies is solved. This achieves an automated and self-optimizing database query process, improving query accuracy and stability.

CN122173518APending Publication Date: 2026-06-09CISDI INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CISDI INFORMATION TECH CO LTD
Filing Date
2026-03-30
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

In existing technologies, database query solutions rely on a single matching mechanism, resulting in low accuracy of table association matching, insufficient precision of SQL generation, low efficiency of query error retries, high manual maintenance costs, and difficulty in adapting to dynamic changes in database table structure and iterative business query requirements.

Method used

By acquiring natural language, identifying the semantics of the query and matching it with preset reference data, the target table structure and the query statement are generated. Query simulation is performed. If there are risks or the conditions are not met, optimization prompts are generated to optimize the statement and retry. The query process is optimized by using dynamic field weights and table structure knowledge graphs.

Benefits of technology

It significantly improves query accuracy, stability, and robustness, automatically optimizes the query process, reduces manual maintenance costs, adapts to changes in database structure, and enhances query performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173518A_ABST
    Figure CN122173518A_ABST
Patent Text Reader

Abstract

This invention provides a data query method, apparatus, electronic device, and storage medium. The method includes identifying the query semantics of natural language, matching the query semantics with preset reference data to obtain a target table structure and a query statement, performing query simulation on the query statement to obtain simulation results, and executing the query statement to obtain query results for the target table structure if no query risk is found in the simulation results. If query risk exists in the simulation results and / or the query results do not meet preset query conditions, optimization prompts are generated based on the query semantics and target table structure to optimize semantic priority, enabling a large model to optimize the query statement according to the optimization prompts. Query retries are then performed based on the optimized query statement. Query retries include performing query simulation on the optimized query statement and executing the optimized query statement after no new query risk is found. This invention significantly improves query accuracy, stability, and robustness.
Need to check novelty before this filing date? Find Prior Art