Journals
  Publication Years
  Keywords
Search within results Open Search
Please wait a minute...
For Selected: Toggle Thumbnails
Chinese Text-to-SQL model for industrial production
Jianqing LYU, Xianbing WANG, Gang CHEN, Hua ZHANG, Minggang WANG
Journal of Computer Applications    2022, 42 (10): 2996-3002.   DOI: 10.11772/j.issn.1001-9081.2021081525
Abstract665)   HTML43)    PDF (1886KB)(266)       Save

When the model of translating English natural language questions into Structured Query Language (SQL) statements (Text-to-SQL) is migrated to Chinese industrial Text-to-SQL task, due to the poor interpretability and strong dispersion of industrial datasets, the representation format of the information of table names and column names in database are often inconsistent with the key information in questions, and the column names in questions are often hidden in the semantics, which leads to a lower exact match accuracy. Aiming at the problems appeared in migration, the corresponding solution was proposed and a modified model was constructed. Firstly, in data use process, factory metadata information was used to solve problem of inconsistency in representation format and the problem that the column names were hidden in the semantics. Then, according to the characteristics of Chinese language expression, a self-attention model based on relative position was used to directly identify the value of where clause by questions and database mode information. Finally, according to the characteristics of the query of industrial questions, the fine-tuned Bidirectional Encoder Representation from Transformers (BERT) was used to classify questions in order to improve the accuracy of SQL statement structure prediction. An industrial dataset based on the aluminum smelting industry was constructed and experimental verification was performed on this dataset. The results show that the exact match accuracy of the proposed model on the industrial test set is 74.2%. Compared with the effect of the mainstream models on English dataset Spider, it can be seen that the proposed model can effectively deal with the Chinese industrial Text-to-SQL task.

Table and Figures | Reference | Related Articles | Metrics