The invention provides a method and a
system for accurately converting a large-model
natural language into an
SQL (Structured
Query Language) based on multi-
modal fusion. The method comprises the following steps: S1, performing
named entity recognition and dependency
syntax analysis on a
natural language text, performing vision-text dual-path
processing on image data, and constructing a
bipartite graph structure for table data so as to obtain a vision text composite feature and a table feature; s2, designing a
modal attention controller and calculating the weight of each
modal through a gating network; s3, constructing a
knowledge graph, clearly recording all legal table names and column names in a
database, and retrieving the
knowledge graph in real time when a decoder generates the table names or the column names; s4, generating an
SQL draft; s5, performing bidirectional
verification correction on the
SQL statement; and S6, outputting the legal SQL statement. According to the method, multi-modal information can be integrated,
information loss and semantic deviation are reduced, illegal statements are avoided through grammar and semantic dual
verification, and the overall reliability of SQL statement generation is improved.