首页> 外国专利> METHOD FOR CONSTRUCTING SQL STATEMENT BASED ON ACTOR-CRITIC NETWORK

METHOD FOR CONSTRUCTING SQL STATEMENT BASED ON ACTOR-CRITIC NETWORK

机译:基于actor-critic网络的SQL语句构造方法

摘要

The invention discloses a method and a device for constructing a SQL statement based on reinforcement learning, wherein the method includes: initializing an actor-critic network parameter; acquiring a sequence pair of natural language and real SQL statement from a data set; inputting a natural language sequence into an actor network encoder, and inputting a real SQL sequence into a critic network encoder; using an encoded hidden state as an initialized hidden state of a corresponding decoder; gradually predicting, by an actor network decoder, a SQL statement action, and inputting the SQL statement action to a critic network decoder and an environment to obtain a corresponding reward; and using a gradient descent algorithm to update the network parameters, and obtaining a constructing model of the natural language to the SQL statement after repeated iteration training.
机译:本发明公开了一种基于强化学习构造SQL语句的方法和装置,该方法包括:初始化actor-critic网络参数;从数据集中获取自然语言和真实SQL语句的序列对;输入自然语言序列到actor网络编码器,输入真实SQL序列到评论网络编码器;使用编码后的隐藏状态作为相应解码器的初始化后的隐藏状态;由参与者网络解码器逐步预测SQL语句动作,并将该SQL语句动作输入到评论者网络解码器和环境中,以获得相应的奖励;通过梯度下降算法更新网络参数,经过反复迭代训练得到SQL语句的自然语言构造模型。

著录项

相似文献

  • 专利
  • 外文文献
  • 中文文献
获取专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号