| In the information age,massive amounts of data are stored in databases.The natural language to SQL technology converts natural language into SQL to improve the efficiency of obtaining data from databases and reduce the cost of data acquisition.In real scenarios,human discourse is contextual,meaning that users tend to interact with the system through multi-round dialogue.Therefore,multi-round natural language to SQL conversion have attracted the attention of a large number of researchers.With the development of deep learning,a large number of researchers have conducted research on converting multi-round natural language into SQL,and have achieved good results.However,the current accuracy of converting natural language to SQL makes this technology unable to be applied in real scenarios.In the current research,researchers mostly focus on the relationship between tokens in natural language discourse and database schema,thus ignoring the relationship between natural language discourse and discourse,although this relationship has been proved to be effective for natural language understanding in some studies.In view of relationship between natural language discourses in multi-round natural language to SQL research,this thesis proposes a method to track the conversation state through dynamic graph and a method to optimize the quality of SQL using dynamic dialogue state graph.The main work of this thesis is as follows:(1)This thesis proposes a method to construct a dialogue state diagram for multiround natural language discourse to SQL,and designs a model to generate the dialogue state graph.This thesis takes natural language discourse as a node,connects the corresponding nodes according to the correlation between the discourse and its corresponding SQL,and defines the type of edge according to the change of the SQL corresponding to the two connected nodes,and finally generates the dialogue state graph.After that,this thesis designs a model to build a dialogue state graph based on natural language discourse,aiming at enabling the model to capture the changes of the corresponding SQL and changes of user query intentions through natural language.(2)This thesis proposes a multi-round natural language to SQL model enhanced by dialogue state graph,and proposes a robust decoding method based on this model.Aiming at the context relevance of multi-round natural language discourse,this thesis optimizes the encoder of the model by combining the dialogue state graph,aiming at capturing the semantic information of the context through the dialogue state graph.After that,this thesis optimizes the model decoder so that the model can emphasize the expression of good features in multiple features while suppressing the expression of bad features,so that the model has certain robustness.(3)Based on the above research work,a multi-round natural language to SQL query system based on multi-round semantic parsing is designed.The system can generate corresponding SQL queries according to the user’s natural language discourse and conversation context. |