The invention discloses an NL2
SQL fine-tuning optimization method based on
deep learning. The method comprises the following steps: firstly, acquiring a
natural language question, generating a target
SQL in combination with similar examples, labeling elements, recording complexity, and strengthening
model learning through data enhancement; then, an integrity index is generated through analysis, an adjustment object is determined according to a threshold value and
semantic equivalence, meanwhile, a correct rate index is analyzed, and a corresponding
signal is generated; and finally, collecting
database information, and optimizing the
SQL execution efficiency based on the
execution plan. According to the NL2SQL fine-tuning optimization method based on
deep learning provided by the invention, the semantic equivalent NL2SQL is classified and processed by adopting the hierarchical adjustment and dynamic
adaptation strategy and the equivalent
group strategy, so that optimization strategy
multiplexing is realized, repeated calculation is greatly reduced, and the optimization efficiency in a large-scale scene is improved. The generalization ability of the model is improved through data enhancement, and the generation quality and execution efficiency of the NL2SQL are comprehensively guaranteed.