This application provides a meta-training method for a
natural language query model, a
natural language query method, a device, a storage medium, and a product. The meta-training method includes: classifying task types based on at least one of query type and
query statement paradigm; collecting sample data from multiple task types to construct a first sample set and a second sample set for each task type; training a first model using a model-independent meta-learning
algorithm based on the first sample set of multiple task types to obtain a second model; and fine-tuning the second model based on the second sample set of a
single task type to obtain a third model for the corresponding task type. The sample data includes natural query statements annotated with structured query statements, and the first model is a pre-trained general
natural language query model. This application combines transfer learning and meta-learning techniques and applies them to the field of natural language querying, effectively reducing model training costs while ensuring the accuracy of
SQL statement conversion.