The invention provides an
SQL (structured
query language) statement generation method based on large-model multi-stage iteration, which is used for
database structure understanding and
natural language SQL query generation, constructing multi-level semantic embedding of a
database structure through advanced semantic modeling, and deeply analyzing a
natural language query request of a user by utilizing an intention recognition model; a query intention frame is extracted in combination with a pre-trained
large model, the query intention frame and
database semantics are embedded and fused by adopting a calibration correction model and in combination with a multi-stage feedback mechanism, and a query intention and
model parameters are optimized step by step; an optimal practice
SQL statement is generated through deep optimization and a retrieval strategy model,
model parameters and retrieval strategies are continuously optimized through self-
adaptive evolution and user preference feedback, and a
knowledge base is updated. According to the method, the problems of much manual intervention, inaccurate intention understanding, insufficient structure understanding and lack of a feedback mechanism are effectively solved, and efficient and accurate SQL query generation is realized.