首页> 外国专利> ANCIENT POEM GENERATION METHOD AND APPARATUS BASED ON ARTIFICIAL INTELLIGENCE, AND DEVICE AND STORAGE MEDIUM

ANCIENT POEM GENERATION METHOD AND APPARATUS BASED ON ARTIFICIAL INTELLIGENCE, AND DEVICE AND STORAGE MEDIUM

机译:基于人工智能的古诗生成方法和装置,以及设备和存储介质

摘要

An ancient poem generation method and apparatus based on artificial intelligence, and a device and a storage medium. The method comprises: obtaining a keyword contained in an ancient poem generation request (S10); determining a target type for generating an ancient poem according to the keyword (S20); inputting the keyword into a preset Transformer model, and generating a first poem draft according to the target type (S30), performing occlusion training by using a pre-trained language model to obtain a temporary first poem draft; and comparing each prediction character in the temporary first poem draft with the corresponding occluded character; if the prediction character is different from the occluded character, continuing performing iterative occlusion prediction on the temporary first poem draft until each prediction character is the same as the corresponding occluded character, and taking the obtained temporary first poem draft as a target poem. By means of a loop iteration mode and a pre-trained language model, occlusion prediction is performed on each character in the temporary first poem draft in sequence, so that each character is continuously updated according to the overall context, and the quality of generating the ancient poem is improved.
机译:一种基于人工智能的古诗生成方法和装置,以及一种装置和存储介质。该方法包括:获取包含在古诗代生成请求中的关键字(S10);确定根据关键字生成古代诗的目标类型(S20);将关键字输入预设变压器模型,并根据目标类型生成第一诗歌草案(S30),通过使用预先培训的语言模型进行闭塞训练来获得临时的第一诗歌草案;并将临时第一诗草案中的每个预测特征与相应的遮挡特征进行比较;如果预测字符与遮挡字符不同,则继续对临时第一诗歌草稿进行迭代遮挡预测,直到每个预测特征与相应的遮挡字符相同,并将获得的临时第一诗草稿作为目标诗。通过循环迭代模式和预先训练的语言模型,依次临时第一诗集中的每个角色对遮挡预测执行,因此根据整体上下文,每个字符连续更新,以及生成的质量古代诗得到改善。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号