CN115310426A - Poetry generation method and device, electronic equipment and readable storage medium - Google Patents

Poetry generation method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN115310426A
CN115310426A CN202210885016.XA CN202210885016A CN115310426A CN 115310426 A CN115310426 A CN 115310426A CN 202210885016 A CN202210885016 A CN 202210885016A CN 115310426 A CN115310426 A CN 115310426A
Authority
CN
China
Prior art keywords
poetry
candidate
clause
sequence
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210885016.XA
Other languages
Chinese (zh)
Other versions
CN115310426B (en
Inventor
蒋强
金澎
陈兴元
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Leshan Normal University
Original Assignee
Leshan Normal University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Leshan Normal University filed Critical Leshan Normal University
Priority to CN202210885016.XA priority Critical patent/CN115310426B/en
Publication of CN115310426A publication Critical patent/CN115310426A/en
Application granted granted Critical
Publication of CN115310426B publication Critical patent/CN115310426B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/211Syntactic parsing, e.g. based on context-free grammar [CFG] or unification grammars
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The application discloses a poetry generating method, a poetry generating device, electronic equipment and a readable storage medium, which are applied to the technical field of natural language processing, wherein the poetry generating method comprises the following steps: acquiring poetry description information; generating a theme white language sequence corresponding to the target poetry according to the poetry description information and a first preset poetry generator; inputting the subject whispering text sequence into the first preset poetry generator to obtain a candidate poetry clause set corresponding to the target poetry, wherein the candidate poetry clause set is a set of candidate clauses describing the subject of the target poetry; and carrying out iterative adjustment on a candidate poetry clause sequence corresponding to the candidate poetry clause set according to a second preset poetry generator and a poetry clause processing command input by a user to obtain the target poetry. The poetry creation efficiency and the poetry quality are hardly taken into account.

Description

诗歌生成方法、装置、电子设备及可读存储介质Poetry generation method, device, electronic device and readable storage medium

技术领域technical field

本申请涉及自然语言处理技术领域,尤其涉及一种诗歌生成方法、装置、电子设备及可读存储介质。The present application relates to the technical field of natural language processing, and in particular to a poetry generation method, device, electronic equipment and readable storage medium.

背景技术Background technique

随着人工智能的不断发展,深度学习技术被应用到了越来越多的领域,以文化领域的诗歌生成为例,其凭借着基于深度学习技术训练好的文本生成器,可在短时间内生成大量的文本内容,进而生成用户需要的诗歌,但是,由于缺乏准确量化诗歌主题的学习信号,进而导致基于文本生成器生成的诗歌往往主题性不强,例如七言律诗“海潮来自九江东,一半芳莲满县红,行到琼台西北去,却疑身已在烟中”,前半段主题在海潮,而后半段却以人为主体进行描述,所以,当前基于文本生成器构造的诗词生成系统,生成的诗歌质量较差,而倘若延续人工创作诗歌的方法,受限于创作天赋和创作质量等因素的影响,创作诗歌的效率通常较低,所以,当前难以兼顾诗歌的创作效率和诗歌质量。With the continuous development of artificial intelligence, deep learning technology has been applied to more and more fields. Taking poetry generation in the cultural field as an example, it can generate texts in a short time by virtue of a well-trained text generator based on deep learning technology. A large amount of text content, and then generate the poems that users need. However, due to the lack of learning signals that accurately quantify the theme of the poems, the poems generated based on the text generator are often not strong in theme. Fanglian is full of red in the county, and I went to the northwest of Qiongtai, but I suspected that I was already in the smoke." The theme of the first half is the tide, while the second half is described with people as the main body. Therefore, the current poetry generation system based on the text generator , the quality of the generated poems is poor, and if the method of artificial poetry creation is continued, the efficiency of poetry creation is usually low due to the influence of factors such as creative talent and creative quality, so it is currently difficult to balance the efficiency of poetry creation and the quality of poetry .

发明内容Contents of the invention

本申请的主要目的在于提供一种诗歌生成方法、装置、电子设备及可读存储介质,旨在解决现有技术中难以兼顾诗歌的创作效率和诗歌质量的技术问题。The main purpose of this application is to provide a poetry generation method, device, electronic equipment and readable storage medium, aiming to solve the technical problem in the prior art that it is difficult to balance the efficiency of poetry creation and the quality of poetry.

为实现上述目的,本申请提供一种诗歌生成方法,所述诗歌生成方法包括:In order to achieve the above purpose, the present application provides a method for generating poetry, which includes:

获取诗歌描述信息;Get poem description information;

依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列;Generate a theme vernacular sequence corresponding to the target poem according to the poem description information and the first preset poem generator;

将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;The subject vernacular sequence is input to the first preset poem generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses is a set of candidate clauses describing the theme of the target poem gather;

依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌。According to the second preset poem generator and the poem clause processing command input by the user, iteratively adjust the candidate poem clause sequence corresponding to the candidate poem clause set to obtain the target poem.

为实现上述目的,本申请还提供一种诗歌生成装置,所述诗歌生成装置包括:In order to achieve the above purpose, the present application also provides a poetry generating device, which includes:

获取模块,用于获取诗歌描述信息;Obtaining module, used to obtain poem description information;

生成模块,用于依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列;A generating module, configured to generate a theme vernacular sequence corresponding to the target poem according to the poem description information and the first preset poem generator;

输入模块,用于将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;An input module, configured to input the subject vernacular sequence into the first preset poem generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses describes the subject of the target poem The set of candidate clauses of ;

调整模块,用于依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌。The adjustment module is configured to iteratively adjust the candidate poetry clause sequence corresponding to the candidate poetry clause set according to the second preset poetry generator and the poetry clause processing command input by the user, so as to obtain the target poem.

本申请还提供一种电子设备,所述电子设备包括:存储器、处理器以及存储在所述存储器上并可在所述处理器上运行的所述诗歌生成方法的程序,所述诗歌生成方法的程序被处理器执行时可实现如上述的诗歌生成方法的步骤。The present application also provides an electronic device, the electronic device comprising: a memory, a processor, and a program of the poetry generating method stored on the memory and operable on the processor, the poetry generating method When the program is executed by the processor, the steps of the above poetry generation method can be realized.

本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有实现诗歌生成方法的程序,所述诗歌生成方法的程序被处理器执行时实现如上述的诗歌生成方法的步骤。The present application also provides a computer-readable storage medium, the computer-readable storage medium stores a program for realizing the poetry generation method, and when the program of the poetry generation method is executed by a processor, the steps of the above-mentioned poetry generation method are realized .

本申请还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述的诗歌生成方法的步骤。The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the above poetry generation method are implemented.

本申请提供了一种诗歌生成方法、装置、电子设备及可读存储介质,也即,获取诗歌描述信息;依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列;将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌。由于通过第一预设诗歌生成器可得到描述诗歌主题的候选子句的集合,也即通过第一预设诗歌生成器即可实现生成突出目标诗歌主题的候选子句的目的,进而通过第二预设诗歌生成器和用户输入的诗歌子句处理命令,对候选子句进行人机交互式调整,最终得到目标诗歌对应的目标诗句,也即,基于目标诗歌的诗歌描述信息,在第一预设诗歌生成器、第二预设诗歌生成器和用户命令的配合下,实现了得到诗歌描述信息对应的目标诗句的目的,由于第一预设诗歌生成器和第二预设诗歌生成器具备生成效率快及生成成本低等特性,进而使得目标诗句对应的候选子句的生成过程得到了保障,也即,实现了提升对于候选子句的创作效率,与此同时,由于用户相对于文本生成器而言,能够对候选子句的优劣性进行更为客观的评价,进而可使得迭代调整后得到的目标诗句更符合市场的需求,也即,通过文本生成器和用户之间的人机交互合作方式迭代处理候选子句,即可实现得到相较于文本生成器单一处理候选子句方式质量更高的目的,所以,实现了平衡诗歌创作效率和诗歌质量的目的,而非仅基于深度学习技术训练好的文本生成器生成用户需要的诗歌,所以克服了基于文本生成器构造的诗词生成系统,导致生成的诗歌的主题性较差的技术缺陷,所以,实现了对诗歌的创造效率和诗歌质量。The present application provides a poetry generation method, device, electronic equipment, and readable storage medium, that is, to obtain the poem description information; according to the poem description information and the first preset poem generator, generate the topic vernacular text corresponding to the target poem sequence; the subject vernacular sequence is input to the first preset poetry generator to obtain a set of candidate poetry clauses corresponding to the target poem, wherein the set of candidate poetry clauses is a candidate clause describing the theme of the target poem A set of sentences; according to the second preset poetry generator and the poetry clause processing command input by the user, iteratively adjust the candidate poetry clause sequence corresponding to the candidate poetry clause set to obtain the target poem. Since the set of candidate clauses describing the theme of poetry can be obtained through the first preset poetry generator, that is, the purpose of generating candidate clauses that highlight the theme of the target poetry can be achieved through the first preset poetry generator, and then through the second Preset the poem generator and the poetry clause processing command input by the user, adjust the candidate clauses interactively, and finally get the target poem corresponding to the target poem, that is, based on the poem description information of the target poem, in the first preset With the cooperation of the poem generator, the second preset poem generator and the user command, the purpose of obtaining the corresponding target verses of the poem description information is realized, because the first preset poem generator and the second preset poem generator have the ability to generate The characteristics of fast efficiency and low generation cost ensure that the generation process of the candidate clauses corresponding to the target verse is guaranteed, that is, the creation efficiency of the candidate clauses is improved. At the same time, due to the user’s relative to the text generator In other words, the pros and cons of candidate clauses can be evaluated more objectively, and then the target verses obtained after iterative adjustment can be more in line with the needs of the market, that is, through the human-computer interaction between the text generator and the user Iterative processing of candidate clauses in a cooperative manner can achieve the purpose of obtaining higher quality than the single processing of candidate clauses by text generators. Therefore, the purpose of balancing poetry creation efficiency and poetry quality is achieved, not only based on deep learning The technically trained text generator generates the poems that users need, so it overcomes the technical defect of the poetry generation system based on the text generator, which leads to poor thematicity of the generated poems. Therefore, it realizes the creation efficiency of poems and poetry quality.

附图说明Description of drawings

此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description serve to explain the principles of the application.

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.

图1为本申请诗歌生成方法第一实施例的流程示意图;Fig. 1 is the schematic flow chart of the first embodiment of the poetry generation method of the present application;

图2为本申请诗歌生成方法第二实施例的流程示意图;Fig. 2 is the schematic flow chart of the second embodiment of the poetry generation method of the present application;

图3为本申请诗歌生成方法第三实施例的装置示意图;Fig. 3 is the schematic diagram of the device of the third embodiment of the poetry generation method of the present application;

图4为本申请实施例中诗歌生成方法涉及的硬件运行环境的设备结构示意图。FIG. 4 is a schematic diagram of the device structure of the hardware operating environment involved in the poetry generation method in the embodiment of the present application.

本申请目的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functions and advantages of the present application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.

具体实施方式Detailed ways

为使本发明的上述目的、特征和优点能够更加明显易懂,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动的前提下所获得的所有其它实施例,均属于本发明保护的范围。In order to make the above objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Apparently, the described embodiments are only some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.

实施例一Embodiment one

首先,应当理解的是,在自然语言处理技术领域,尤其是诗歌创作上,人和机器均有着独特的优势,基于深度学习的诗歌生成器生成诗歌的效率高,但是,人类对于诗歌质量的判别具有着普适的主观性,也即,不同人们对于不同的质量诗歌的质量判别存在着差异,但是,对质量差距过大的诗歌有着相同的判断标准,例如,基于诗歌生成器生成两段诗歌A“十里街巷寻故友,高山流水觅知音”和B“今天是个好日子,心里住着大太阳”,生成器是无法对诗歌A和诗歌B的质量作出客观评价的,但是,倘若是创作和评价的过程均由人工进行,又会使得创作的效率低,与此同时,诗歌是讲究逻辑、情感和意境的,倘若一首诗歌前一段和后一段所体现的主体不一致,那么将会给人们营造一种主题不突出的感受,目前,针对于主题这一抽象概念,是缺乏相应的学习信号的,这也导致文本生成器所生成诗歌的主题通常情况下是不符合人们的预期的,所以,目前诗歌生成方法中存在人工创作的创作效率较低,以及诗歌生成器创作的创作质量较差的技术缺陷,所以,目前亟需一种兼顾诗歌的创作效率和诗歌质量的方法。First of all, it should be understood that in the field of natural language processing technology, especially in poetry creation, both humans and machines have unique advantages. The poetry generator based on deep learning can generate poetry with high efficiency. It has universal subjectivity, that is, different people have different judgments on the quality of different quality poems, but they have the same judgment standard for poems with large quality differences. For example, two poems are generated based on the poem generator A "Looking for old friends in ten miles of streets and alleys, looking for bosom friends in high mountains and flowing water" and B "Today is a good day, with a big sun living in my heart", the generator cannot make an objective evaluation of the quality of poems A and B, but if it is created and The evaluation process is all carried out manually, which will make the creation efficiency low. At the same time, poetry pays attention to logic, emotion and artistic conception. Create a feeling that the theme is not prominent. At present, there is a lack of corresponding learning signals for the abstract concept of the theme, which also leads to the theme of the poems generated by the text generator usually not meeting people's expectations, so , the current poetry generation method has the technical defects of low creation efficiency of manual creation and poor creation quality of poetry generator creation. Therefore, there is an urgent need for a method that takes both poetry creation efficiency and poetry quality into account.

本申请实施例提供一种诗歌生成方法,在本申请诗歌生成方法的第一实施例中,参照图1,所述诗歌生成方法包括:The embodiment of the present application provides a method for generating a poem. In the first embodiment of the method for generating a poem of the present application, referring to FIG. 1 , the method for generating a poem includes:

步骤S10,获取诗歌描述信息;Step S10, obtaining poem description information;

步骤S20,依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列;Step S20, generating a theme vernacular sequence corresponding to the target poem according to the poem description information and the first preset poem generator;

在本实施例中,需要说明的是,所述诗歌生成方法设置于诗歌生成系统,所述诗歌生成系统可安装于手机以及电脑等智能设备上,所述目标诗歌为用户通过所述诗歌生成系统得到的,符合预期需求的诗歌,所述诗歌描述信息用于描述用户对于诗歌的需求,当用户需要创作一首诗歌时,可通过在智能设备的诗歌生成系统输入诗歌描述信息,进而基于用户和诗歌生成系统的简单交互,生成符合需求的诗歌,在一种可实施的方式中,假设诗歌生成系统安装于手机移动终端,用户在手机的交互界面输入“生成一首祝福前程的五言律诗”,则诗歌生成系统以“生成一首祝福前程的五言律诗”作为诗歌描述信息,生成主题围绕“祝福前程”,“五言律诗”体裁的诗歌。In this embodiment, it should be noted that the poetry generation method is set in a poetry generation system, and the poetry generation system can be installed on smart devices such as mobile phones and computers, and the target poems are generated by users through the poetry generation system. The poems that meet the expected needs are obtained. The poem description information is used to describe the user's needs for poems. When the user needs to create a poem, the poem description information can be input in the poem generation system of the smart device, and then based on the user and The simple interaction of the poetry generation system generates poems that meet the needs. In an implementable way, assume that the poetry generation system is installed on the mobile terminal of the mobile phone, and the user inputs "generate a five-character verse to bless the future" in the interactive interface of the mobile phone. , the poetry generation system uses "generate a five-character verse that blesses the future" as the poem description information, and generates poems with the theme of "bless the future" and "five-character verse".

另外地,需要说明的是,所述第一预设诗歌生成器用于逐句生成符合诗歌小句子规范,以及各小句共同对应的主题突出的诗歌,例如,在一种可实施的方式中,用户输入多个关键字作为诗歌描述信息,其中,诗歌描述信息包括“诗歌的体裁为律诗”,则第一预设诗歌生成器通过生成诗歌指定句数对应于用户关键字的白话文子句,其中,各白话文子句用来描述诗歌主题,进而根据各白话文子句生成对应的候选诗歌子句,其中,白话文子句用于表征符合诗歌主题的子句,候选诗歌子句用于表征符合诗歌主题及体裁的子句,例如,假设诗歌的体裁为七言律诗,则白话文子句和候选诗歌子句的句数均为8,所述主题白话文序列为所述第一预设诗歌生成器的输入参数,用于表征符合诗歌主题的总白话文子句,其中,所述总白话文子句为各所述白话文子句之和,例如,在一种可实施的方式中,假设所述诗歌描述信息包括“诗歌体裁为五言绝句”、“u1”、“u2”和“u3”,也即,所述白话文子句的数量为4(k=4),白话文子句为“e1”、“e2”、“e3”和“e4”,则主题白话文序列可以为(u1,u2,u3,#,e1,e2,e3,e4),其中,“#”为序列中间间隔符。In addition, it should be noted that the first preset poem generator is used to generate sentence-by-sentence poems that conform to the small sentence specification of poetry and that each small sentence corresponds to a prominent theme. For example, in an implementable manner, The user inputs a plurality of keywords as the poem description information, wherein the poem description information includes "the genre of the poem is regulated poetry", then the first preset poem generator generates vernacular clauses corresponding to the user's keywords by generating the specified number of sentences in the poem, where , each vernacular clause is used to describe the theme of the poem, and then the corresponding candidate poetic clause is generated according to each vernacular clause, where the vernacular clause is used to represent the clause that meets the theme of the poem, and the candidate poetry clause is used to represent the clause that meets the theme of the poem and genre clauses, for example, assuming that the genre of poetry is a heptadic verse, then the number of sentences of the vernacular clause and the candidate poetry clause is 8, and the subject vernacular sequence is the input of the first preset poetry generator parameter, used to characterize the total vernacular clauses conforming to the theme of the poem, wherein the total vernacular clauses are the sum of each of the vernacular clauses, for example, in an implementable manner, it is assumed that the poem description information includes "The genre of poetry is five-character quatrains", "u 1 ", "u 2 ", and "u 3 ", that is, the number of the vernacular clauses is 4 (k=4), and the vernacular clauses are "e 1 " , "e 2 ", "e 3 ", and "e 4 ", then the topic vernacular sequence can be (u 1 ,u 2 ,u 3 ,#,e 1 ,e 2 ,e 3 ,e 4 ), where "#" is the separator in the middle of the sequence.

作为一种示例,步骤S10至步骤S20包括:获取用户输入的目标诗歌的诗歌描述信息;依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列。As an example, steps S10 to S20 include: obtaining the poem description information of the target poem input by the user; and generating a theme vernacular sequence corresponding to the target poem according to the poem description information and the first preset poem generator.

其中,所述诗歌描述信息包括诗句数量描述信息和诗歌主题描述信息,所述依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列的步骤包括:Wherein, the poem description information includes the description information of the number of poems and the poem theme description information, and the step of generating the topic vernacular sequence corresponding to the target poem according to the poem description information and the first preset poem generator includes:

步骤A10,依据所述诗句数量描述信息,确定所述目标诗歌的目标诗句数量;Step A10, according to the description information of the number of verses, determine the target number of verses of the target poem;

步骤A20,依据所述诗歌主题描述信息,确定所述目标诗歌的诗歌主题序列;Step A20, according to the poem theme description information, determine the poem theme sequence of the target poem;

步骤A30,依据用户输入的候选子句处理命令,在所述第一预设诗歌生成器迭代输入所述诗歌主题序列,直至得到包含所述目标诗句数量的候选白话子句序列对应的候选主题序列;Step A30, according to the candidate clause processing command input by the user, iteratively input the poem topic sequence in the first preset poem generator until the candidate topic sequence corresponding to the candidate vernacular clause sequence containing the target number of verses is obtained ;

步骤A40,对所述候选主题序列进行预处理,得到所述主题白话文序列。Step A40, preprocessing the candidate topic sequence to obtain the topic vernacular sequence.

在本实施例中,需要说明的是,所述诗句数量描述信息用于描述所述目标诗歌的诗歌子句的数量,所述诗歌主题描述信息用于描述所述目标诗歌的诗歌子句所表征的主题,具体可以为诗歌关键字等,例如,在一种可实施的方式中,假设所述诗句数量描述信息为“4”,所述诗歌主题信息为“送别”和“友人”两大关键字,进而所述目标诗歌为以“送别友人为主题的五言绝句”,其中,所述诗句数量描述信息即为目标诗句数量,所述诗歌主题序列初始化后由所述诗歌主题描述信息决定的序列,例如,假设所述诗歌主题描述信息为诗歌关键字“u4”和“u5”,则所述诗歌主题序列为(u1,u2,#)。In this embodiment, it should be noted that the description information of the number of poems is used to describe the number of poem clauses of the target poem, and the description information of the theme of poetry is used to describe the number of poem clauses of the target poem. The theme of the poem can specifically be poetry keywords, etc. For example, in an implementable manner, it is assumed that the description information of the number of poems is "4", and the poem theme information is two key words "farewell" and "friends". words, and then the target poem is a five-character quatrain with the theme of "sending off friends", wherein, the description information of the number of poems is the number of target poems, and the poem theme sequence is determined by the description information of the poem theme after initialization Sequence, for example, assuming that the poem topic description information is poetry keywords “u 4 ” and “u 5 ”, then the poem topic sequence is (u 1 , u 2 , #).

另外地,需要说明的是,所述候选子句处理命令用于对所述目标诗歌的诗歌候选子句进行处理,所述候选白话子句序列为所述候选白话子句对应的序列,所述候选主题序列为所述目标诗歌的候选主题的序列,其中,所述候选主题为所述诗歌生成系统基于所述诗歌描述信息生成的白话文主题,例如,在一种可实施的方式中,假设所述目标诗歌的体裁为五言绝句,其中,用户输入的诗歌关键字“u7”、“u8”、“u9”和“u10”,诗歌主题序列为,(u7,u8,u9,u10,#)当所述诗歌关键字对应的诗歌主题序列输入至所述第一预设诗歌生成器后,所述第一预设诗歌生成器将生成多个候选白话句子,其中,所述候选白话可以为“r1”、“r2”、“r3”……“rn”,则(r1),(r2),(r3)……或rn均可以用于表征候选白话子句序列,倘若最终选取的目标白话文子句为“r1”、“r2”、“r3”和“r4”,则所述候选主题序列可以为(u7,u8,u9,u10,#,e7,e8)或(u7,u8,u9,u10,#,e7,e8,e9)等。In addition, it should be noted that the candidate clause processing command is used to process the poetry candidate clauses of the target poem, the candidate vernacular clause sequence is the sequence corresponding to the candidate vernacular clause, the The candidate topic sequence is a sequence of candidate topics of the target poem, wherein the candidate topic is a vernacular topic generated by the poetry generation system based on the poem description information. For example, in an implementable manner, it is assumed that the The genre of the target poem is five-character quatrains, among which, the poetry keywords “u 7 ”, “u 8 ”, “u 9 ” and “u 10 ” input by the user, and the theme sequence of the poems are (u 7 ,u 8 , u 9 , u 10 ,#) When the poetry theme sequence corresponding to the poetry keyword is input to the first preset poetry generator, the first preset poetry generator will generate a plurality of candidate vernacular sentences, wherein , the candidate vernacular can be "r 1 ", "r 2 ", "r 3 "... "r n ", then (r 1 ), (r 2 ), (r 3 )...or r n can be It is used to represent candidate vernacular clause sequences. If the target vernacular clauses finally selected are “r 1 ”, “r 2 ”, “r 3 ” and “r 4 ”, the candidate topic sequence can be (u 7 , u 8 ,u 9 ,u 10 ,#,e 7 ,e 8 ) or (u 7 ,u 8 ,u 9 ,u 10 ,#,e 7 ,e 8 ,e 9 ), etc.

作为一种示例,步骤A10至步骤A40包括:将所述诗句数量描述信息表征的数量作为所述目标诗歌的目标诗句数量;将所述诗歌主题描述信息对应的描述序列拼接为所述目标诗歌的诗歌主题序列,其中,所述描述序列用于表征所述描述信息对应的序列,所述描述信息可以为一个或多个;依据用户输入的候选子句处理命令,在所述第一预设诗歌生成器迭代输入所述诗歌主题序列,直至得到包含所述目标诗句数量的候选白话子句序列对应的候选主题序列;将预设序列间隔符插入至所述候选主题序列,得到所述主题白话文序列,其中,所述预设序列间隔符可以为“&”。As an example, steps A10 to A40 include: using the number represented by the verse quantity description information as the target verse quantity of the target poem; splicing the description sequence corresponding to the poem theme description information into the target poem Poetry theme sequence, wherein, the description sequence is used to characterize the sequence corresponding to the description information, and the description information may be one or more; according to the candidate clause processing command input by the user, in the first preset poem The generator iteratively inputs the poem topic sequence until it obtains the candidate topic sequence corresponding to the candidate vernacular clause sequence containing the target number of verses; inserts the preset sequence spacer into the candidate topic sequence to obtain the topic vernacular sequence , wherein, the preset sequence delimiter may be "&".

在一种可实施的方式中,诗歌生成系统在接收到用户输入的诗歌描述信息后,首先通过初始化得到诗歌主题序列,进而将诗歌主题序列迭代输入至第一预设诗歌生成器,得到预设数量的候选白话子句,进而基于人工判断候选白话子句是否符合质量效果,进而将符合质量效果的候选白话子句进行语句处理,得到对应的候选白话子句序列插入至诗歌主题序列,直至诗歌主题序列对应的候选主题序列包括所述诗句数量描述信息对应的诗歌子句数量的候选白话子句序列,最终对所述候选主题序列进行间隔处理(增加序列间隔符),得到主题白话文序列。In an implementable manner, after receiving the poem description information input by the user, the poetry generation system first obtains the poem theme sequence through initialization, and then iteratively inputs the poem theme sequence to the first preset poem generator to obtain the preset The number of candidate vernacular clauses, and then based on manual judgment whether the candidate vernacular clauses meet the quality effect, and then the candidate vernacular clauses that meet the quality effect are processed, and the corresponding candidate vernacular clause sequence is inserted into the poetry topic sequence, until the poem The candidate topic sequence corresponding to the topic sequence includes the candidate vernacular clause sequence of the number of poetry clauses corresponding to the description information of the number of verses, and finally space the candidate topic sequence (by adding sequence spacers) to obtain the topic vernacular sequence.

其中,所述用户输入的候选子句处理命令包括候选子句检测命令和候选子句修改命令,所述依据用户输入的候选子句处理命令,在所述第一预设诗歌生成器迭代输入所述诗歌主题序列,直至得到包含所述目标诗句数量的候选白话子句序列对应的候选主题序列的步骤包括:Wherein, the candidate clause processing command input by the user includes a candidate clause detection command and a candidate clause modification command, and according to the candidate clause processing command input by the user, iteratively input all The poem topic sequence until the candidate topic sequence corresponding to the candidate vernacular clause sequence containing the number of target verses is obtained includes:

步骤B10,将所述诗歌主题序列输入至所述第一预设诗歌生成器,生成候选白话子句集;Step B10, inputting the poem theme sequence into the first preset poem generator to generate a set of candidate vernacular clauses;

步骤B20,依据所述候选子句检测命令,检测所述候选白话子句集是否存在候选白话子句;Step B20, according to the candidate clause detection command, detect whether there are candidate vernacular clauses in the candidate vernacular clause set;

步骤B30,若不存在所述候选白话子句,则返回执行步骤:将所述诗歌主题序列输入至所述第一预设诗歌生成器,生成候选白话子句集;Step B30, if the candidate vernacular clauses do not exist, return to the execution step: input the poem theme sequence into the first preset poetry generator to generate a set of candidate vernacular clauses;

步骤B40,若存在所述候选白话子句,则依据所述候选子句修改命令,对所述候选白话子句进行修改,得到目标白话子句;Step B40, if the candidate vernacular clause exists, modify the candidate vernacular clause according to the candidate clause modification command to obtain the target vernacular clause;

步骤B50,依据所述目标白话子句,对所述诗歌主题序列进行迭代更新,直至更新后的诗歌主题序列具备所述目标诗句数量的候选白话子句序列。Step B50, iteratively updating the poetry theme sequence according to the target vernacular clause until the updated poetry theme sequence has the number of candidate vernacular clause sequences of the target verse.

在本实施例中,需要说明的是,所述候选子句检测命令用于检测所述候选白话子句是否符合用户对于目标诗歌的质量效果需求,也即,检测所述候选白话子句是否为目标白话子句,所述目标白话子句为满足用户对于目标诗歌的质量效果需求的子句,所述候选白话子句集为描述所述目标诗歌主题的候选白话子句的集合,所述候选子句修改命令用于对所述候选白话子句进行修改,具体修改程度由用户确定,例如,在一种可实施的方式中,假设用户输入的诗歌关键字为“希望”,候选白话子句为“尽管前路障碍重重,但仍然会乘长风破万里浪,挂上云帆,横渡沧海,到达理想的彼岸”,则目标白话子句可以为“总会有乘风破浪的那一天,挂起高高的帆渡过茫茫大海”,其中,由候选白话子句至目标白话子句的过程是为了提高用户对白话子句的满意效果。In this embodiment, it should be noted that the candidate clause detection command is used to detect whether the candidate vernacular clause meets the user's quality and effect requirements for the target poem, that is, to detect whether the candidate vernacular clause is The target vernacular clause, the target vernacular clause is a clause that satisfies the user's quality and effect requirements for the target poem, the candidate vernacular clause set is a set of candidate vernacular clauses describing the subject of the target poem, and the candidate vernacular clause The sentence modification command is used to modify the candidate vernacular clauses, and the specific degree of modification is determined by the user. For example, in an implementable manner, assuming that the poetry keyword input by the user is "hope", the candidate vernacular clauses are "Although there are many obstacles in the road ahead, we will still ride the long wind and break through the thousands of miles of waves, hang up the cloud sails, cross the sea, and reach the ideal shore." High sails across the vast sea", in which, the process from the candidate vernacular clause to the target vernacular clause is to improve the user's satisfaction with the vernacular clause.

作为一种示例,步骤B10至步骤B50包括:将所述诗歌主题序列输入至所述第一预设诗歌生成器,生成多个候选白话子句;依据用户输入的所述候选子句检测命令,检测所述候选白话子句集是否存在候选白话子句;若检测到所述候选白话子句集不存在所述候选白话子句,则返回执行步骤:将所述诗歌主题序列输入至所述第一预设诗歌生成器,生成候选白话子句集;若检测到所述候选白话子句集存在所述候选白话子句,则根据用户输入的所述候选子句修改命令,对所述候选白话子句进行修改,得到目标白话子句;将所述目标白话子句对应的目标白话子句序列迭代插入至所述诗歌主题序列,得到具备所述目标诗句数量的候选白话子句序列的候选主题序列。As an example, steps B10 to B50 include: inputting the poem theme sequence into the first preset poem generator to generate a plurality of candidate vernacular clauses; according to the candidate clause detection command input by the user, Detect whether there are candidate vernacular clauses in the candidate vernacular clause set; if it is detected that the candidate vernacular clause does not exist in the candidate vernacular clause set, then return to the execution step: input the poetry theme sequence into the first preset A poetry generator is set to generate a set of candidate vernacular clauses; if it is detected that the candidate vernacular clauses exist in the set of candidate vernacular clauses, the candidate vernacular clauses are modified according to the modification command of the candidate clauses input by the user , to obtain the target vernacular clause; iteratively inserting the target vernacular clause sequence corresponding to the target vernacular clause into the poem topic sequence to obtain a candidate topic sequence having the number of candidate vernacular clause sequences of the target verse.

步骤S30,将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;Step S30, input the subject vernacular sequence into the first preset poem generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses are candidates for describing the theme of the target poem a collection of clauses;

步骤S40,依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌。Step S40, according to the second preset poetry generator and the poetry clause processing command input by the user, iteratively adjust the candidate poetry clause sequence corresponding to the candidate poetry clause set to obtain the target poem.

在本实施例中,需要说明的是,所述候选诗歌子句集合为描述所述目标诗歌主题的候选句子的集合,也即,所述候选诗歌子句集合为多个候选诗歌子句的集合,所述第二预设诗歌生成器用于逐句优化诗歌子句,以生成符合用户需求的诗歌,例如,在一种可实施的方式中,假设目标诗歌为五言绝句,也即,候选诗歌子句为五个字符,则所述第二预设诗歌生成器可优化每一句候选诗歌子句的每一个字符,具体字符由用户与诗歌生成系统的交互过程确定。In this embodiment, it should be noted that the set of candidate poetry clauses is a set of candidate sentences describing the subject of the target poetry, that is, the set of candidate poetry clauses is a set of multiple candidate poetry clauses , the second preset poetry generator is used to optimize poetry clauses sentence by sentence, so as to generate poems that meet user needs. If the clause is five characters, the second preset poem generator can optimize each character of each candidate poem clause, and the specific character is determined by the interaction process between the user and the poem generating system.

作为一种示例,步骤S30至步骤S40包括:将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌,其中,所述诗歌子句处理命令用于处理所述候选诗歌子句。As an example, steps S30 to S40 include: inputting the subject vernacular sequence into the first preset poem generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses To describe the set of candidate clauses of the target poetry theme; according to the second preset poetry generator and the poetry clause processing command input by the user, iteratively adjust the sequence of candidate poetry clauses corresponding to the set of candidate poetry clauses, The target poem is obtained, wherein the poem clause processing commands are used to process the candidate poem clauses.

其中,所述用户输入的诗歌子句处理命令包括诗歌子句检测命令和诗歌子句评价命令,所述依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌的步骤包括:Wherein, the poetry clause processing command input by the user includes a poetry clause detection command and a poetry clause evaluation command, and according to the second preset poem generator and the poetry clause processing command input by the user, the candidate poetry The clause sequence of the candidate poem corresponding to the clause set is adjusted iteratively, and the steps of obtaining the target poem include:

步骤C10,依据所述候选诗歌子句集,确定所述目标诗歌的目标诗句数量;Step C10, according to the set of candidate poem clauses, determine the number of target verses of the target poem;

步骤C20,依据所述诗歌子句检测命令,检测所述候选诗歌子句集是否存在候选诗歌子句;Step C20, according to the poetry clause detection command, detect whether there are candidate poetry clauses in the candidate poetry clause set;

步骤C30,若不存在,则返回执行步骤:将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;Step C30, if it does not exist, return to the execution step: input the subject vernacular sequence into the first preset poem generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses is a collection of candidate clauses describing the subject of said target poem;

步骤C40,若存在,则依据所述诗歌子句评价命令和所述候选诗歌子句,对所述候选诗歌子句序列进行迭代更新,直至更新后的候选诗歌子句序列包含所述目标诗句数量的目标诗句序列;Step C40, if it exists, according to the poetry clause evaluation command and the candidate poetry clauses, iteratively update the candidate poetry clause sequence until the updated candidate poetry clause sequence contains the target number of poems The target sequence of verses;

步骤C50,将所述更新后的候选诗歌子句序列中的目标诗句序列转换为所述目标诗句。Step C50, converting the target verse sequence in the updated candidate poetry clause sequence into the target verse sequence.

作为一种示例,步骤C10至步骤C50包括:将所述候选诗歌子句集的候选诗歌子句数量作为所述目标诗歌的目标诗句数量;依据所述诗歌子句检测命令,检测所述候选诗歌子句集是否存在候选诗歌子句,其中,所述诗歌子句检测命令用于检测所述候选诗歌子句是否符合用户对于目标诗歌的质量效果需求;若检测到所述候选诗歌子句集不存在所述候选诗歌子句,则返回执行步骤:将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;若检测到所述候选诗歌子句集存在所述候选诗歌子句,则依据所述诗歌子句评价命令和所述候选诗歌子句,对所述候选诗歌子句序列进行迭代更新,直至更新后的候选诗歌子句序列包含所述目标诗句数量的目标诗句序列;将所述更新后的候选诗歌子句序列中的目标诗句序列转换为所述目标诗句。As an example, steps C10 to C50 include: using the number of candidate poem clauses in the candidate poem clause set as the number of target poems in the target poem; detecting the candidate poem clauses according to the poetry clause detection command Whether there are candidate poetry clauses in the sentence set, wherein, the poetry clause detection command is used to detect whether the candidate poetry clauses meet the user's quality effect requirements for the target poetry; if it is detected that the candidate poetry clause set does not exist, the Candidate poetry clauses, then return to the execution step: input the subject vernacular sequence into the first preset poetry generator to obtain a set of candidate poetry clauses corresponding to the target poem, wherein the set of candidate poetry clauses is description A collection of candidate clauses of the target poetry theme; if it is detected that the candidate poetry clauses exist in the candidate poetry clause set, then according to the poetry clause evaluation command and the candidate poetry clauses, the candidate The poetry clause sequence is iteratively updated until the updated candidate poetry clause sequence contains the target verse sequence of the target verse number; the target verse sequence in the updated candidate poetry clause sequence is converted into the target verse sequence .

其中,所述依据所述诗歌子句评价命令和所述候选诗歌子句,对所述候选诗歌子句序列进行迭代更新,直至更新后的候选诗歌子句序列包含所述目标诗句数量的目标诗句序列的步骤包括:Wherein, according to the poetry clause evaluation command and the candidate poetry clauses, the sequence of candidate poetry clauses is iteratively updated until the updated sequence of candidate poetry clauses contains the target verses of the target verse number The sequence of steps includes:

步骤D10,依据所述第一诗歌子句评价命令,对所述候选诗歌子句进行评价编辑,得到评价编辑后的候选诗句;Step D10: Evaluate and edit the candidate poetry clauses according to the first poem clause evaluation command, and obtain the candidate poems after evaluation and editing;

步骤D20,依据所述第二诗歌子句评价命令,确定所述候选诗句是否为目标诗句;Step D20, according to the second poem clause evaluation command, determine whether the candidate poem is the target poem;

步骤D30,若是,则依据所述候选诗句,对所述候选诗歌子句序列进行更新;Step D30, if yes, update the clause sequence of the candidate poems according to the candidate poems;

步骤D40,若否,则确定所述候选诗歌子句序列对应的候选诗句序列;Step D40, if not, then determine the candidate verse sequence corresponding to the candidate verse clause sequence;

步骤D50,依据所述候选诗歌子句的子句序列号,将所述候选诗句序列进行处理,得到处理后的候选诗句序列;Step D50, processing the candidate verse sequence according to the clause sequence numbers of the candidate verse clauses to obtain the processed candidate verse sequence;

步骤D60,将处理后的候选诗句序列输入至所述第二预设诗歌生成器,得到目标诗句子句,并返回执行步骤:依据所述诗歌子句检测命令,检测所述候选诗歌子句集是否存在候选诗歌子句。Step D60, input the processed candidate poem sequence into the second preset poem generator to obtain the target poem sentence, and return to the execution step: according to the poem clause detection command, detect whether the candidate poem clause set is There are candidate poetry clauses.

在本实施例中,需要说明的是,所述第一诗歌子句评价命令用于反馈用户对诗歌子句的评价结果,所述第二诗歌子句评价命令用于反馈用户对整体诗歌的评价结果,所述子句序列号用于标识不同的候选诗歌子句在目标诗歌中的位置,所述候选诗句序列由各所述候选诗歌子句序列拼接而成,例如,在一种可实施的方式中,假设将主题白话文序列输入至第一预设诗歌生成器后,候选诗歌子句为“p1”、“p2”、“p3”……“pn”,根据用户输入的第一诗歌子句评价命令,得到评价编辑后的候选诗句“sk”,进而将评价编辑后的候选诗句对应的序列插入至所述主题白话文序列,直至插入至所述主题白话文序列的目标诗句的数量和所述诗句数量描述信息所表征的数量一致。In this embodiment, it should be noted that the first poetry clause evaluation command is used to feed back the user's evaluation result on the poetry clause, and the second poetry clause evaluation command is used to feed back the user's evaluation on the overall poem As a result, the clause sequence numbers are used to identify the positions of different candidate poem clauses in the target poem, and the candidate poem sequence is formed by splicing each candidate poem clause sequence, for example, in an implementable In the method, it is assumed that after the topic vernacular sequence is input into the first preset poetry generator, the candidate poetry clauses are "p 1 ", "p 2 ", "p 3 "..."p n ", according to the first A poem clause evaluation command to obtain the evaluated and edited candidate verse "s k ", and then insert the sequence corresponding to the evaluated and edited candidate verse into the subject vernacular sequence, until the target sentence inserted into the subject vernacular sequence The quantity is consistent with the quantity represented by the verse quantity description information.

作为一种示例,步骤D10至步骤D60包括:依据用户输入的第一诗歌子句评价命令,对所述候选诗歌子句进行评价编辑,得到评价编辑后的候选诗句;依据用户输入的第二诗歌子句评价命令,确定所述候选诗句是否为目标诗句;若确定所述候选诗句为所述目标诗句,则将所述候选诗句对应的候选诗句序列拼接至所述候选诗歌子句序列;若确定所述候选诗句不为所述目标诗句,则确定所述候选诗歌子句序列对应的候选诗句序列;依据所述候选诗歌子句的子句序列号,将所述候选诗句序列进行处理,得到处理后的候选诗句序列;将处理后的候选诗句序列输入至所述第二预设诗歌生成器,得到目标诗句子句,并返回执行步骤:依据所述诗歌子句检测命令,检测所述候选诗歌子句集是否存在候选诗歌子句。As an example, step D10 to step D60 include: according to the first poem clause evaluation command input by the user, perform evaluation and editing on the candidate poem clauses to obtain the candidate poem sentences after evaluation; according to the second poem clause input by the user, Clause evaluation command to determine whether the candidate verse is the target verse; if it is determined that the candidate verse is the target verse, the candidate verse sequence corresponding to the candidate verse is spliced into the candidate verse clause sequence; if determined If the candidate verse is not the target verse, then determine the candidate verse sequence corresponding to the candidate verse clause sequence; process the candidate verse sequence according to the clause sequence number of the candidate verse clause to obtain a processed the candidate verse sequence after processing; input the processed candidate verse sequence to the second preset poetry generator to obtain the target verse sentence, and return to the execution step: detect the candidate poetry according to the poetry clause detection command Whether there are candidate poem clauses in the clause set.

其中,在所述获取诗歌描述信息的步骤之前,所述诗歌生成方法还包括:Wherein, before the step of obtaining poem description information, the poem generation method also includes:

步骤E10,获取诗歌训练语料集对应的诗歌关键字序列和译文训练语料集对应的诗歌主题序列,其中,所述诗歌训练语料集的诗歌训练语料和所述译文训练语料集的译文训练语料一一对应;Step E10, obtaining the poetry keyword sequence corresponding to the poetry training corpus and the poetry topic sequence corresponding to the translation training corpus, wherein the poetry training corpus of the poetry training corpus and the translation training corpus of the translation training corpus are one by one correspond;

步骤E20,将诗歌训练语料集序列、所述诗歌关键字序列和所述诗歌主题序列共同拼接为诗歌训练语料序列;Step E20, splicing together the poetry training corpus sequence, the poetry keyword sequence and the poetry theme sequence into a poetry training corpus sequence;

步骤E30,依据第一预设拼接方式,对所述诗歌训练语料序列进行拼接调整,得到第一训练语料序列;Step E30, splicing and adjusting the poetry training corpus sequence according to the first preset splicing method to obtain the first training corpus sequence;

步骤E40,依据所述第一训练语料序列,对待训练第一生成器进行训练,得到第一预设诗歌生成器。Step E40, according to the first training corpus sequence, train the first generator to be trained to obtain a first preset poetry generator.

在本实施例中,需要说明的是,所述诗歌训练语料集为诗歌训练语料的集合,所述诗歌训练语料用于表征诗歌生成系统从云端数据库随机抽取的诗歌,所述译文训练语料集为诗歌训练语料的译文的集合,所述诗歌关键字序列为诗歌生成系统从诗歌训练语料集抽取的诗歌关键字对应的序列,所述诗歌主题序列用于表征所述译文训练语料集的译文训练语料描述主题对应的序列,所述第一预设拼接方式为以关键字-主题-诗歌子句为拼接顺序拼接的方式,所述第一训练语料序列用于对待训练第一生成器进行训练,所述待训练第一生成器可以为GTP-2等。In this embodiment, it should be noted that the poetry training corpus is a collection of poetry training corpora, and the poetry training corpus is used to characterize poems randomly extracted from the cloud database by the poetry generation system, and the translation training corpus is A collection of translations of the poetry training corpus, the poetry keyword sequence is a sequence corresponding to the poetry keywords extracted from the poetry training corpus by the poetry generation system, and the poetry theme sequence is used to characterize the translation training corpus of the translation training corpus Describe the sequence corresponding to the topic, the first preset splicing method is the splicing sequence of keywords-theme-poetry clauses, the first training corpus sequence is used to train the first generator to be trained, so The first generator to be trained can be GTP-2 or the like.

作为一种示例,步骤E10至步骤E40包括:获取诗歌训练语料集对应的诗歌关键字序列和译文训练语料集对应的诗歌主题序列,其中,所述诗歌训练语料集的诗歌训练语料和所述译文训练语料集的译文训练语料一一对应;将诗歌训练语料集序列、所述诗歌关键字序列和所述诗歌主题序列共同拼接为诗歌训练语料序列;将诗歌训练语料集序列、所述诗歌关键字序列和所述诗歌主题序列共同拼接为诗歌训练语料序列;依据以关键字-主题-诗歌子句为拼接顺序拼接的方式,对所述诗歌训练语料序列进行拼接调整,得到第一训练语料序列。As an example, step E10 to step E40 include: obtaining the poetry keyword sequence corresponding to the poetry training corpus and the poetry theme sequence corresponding to the translation training corpus, wherein the poetry training corpus of the poetry training corpus and the translation The translation training corpus of the training corpus corresponds one-to-one; the poetry training corpus sequence, the poetry keyword sequence and the poetry theme sequence are jointly spliced into the poetry training corpus sequence; the poetry training corpus sequence, the poetry keyword sequence The sequence and the poetry theme sequence are jointly spliced into a poetry training corpus sequence; according to the method of splicing keywords-theme-poetry clauses as the splicing order, the poetry training corpus sequence is spliced and adjusted to obtain the first training corpus sequence.

在一种可实施的方式中,假设诗歌训练语料集为{s1,s2,s3,s4},其中,sk的下标“k”用于表征诗歌训练语料集对应的诗歌子句在诗歌中的位置,进而抽取诗歌训练语料的关键字组成诗歌关键字序列(u1,u2,u3……us),其中,us的下标“s”用于表征译文训练语料集对应的诗歌关键字的重要等级,也即,重要等级越高的关键字在对应的关键字序列中越靠前,其中,抽取的方式可以为根据译文或完全基于人工抽取的方式,进而再获取加工编辑译文训练语料后对应的译文主题序列(e1,e2,e3……ek),通过第一预设拼接方式拼接为第一训练语料序列(u1,u2,u3……us,#,e1,e2,e3……ek,&,s1,s2,s3……sk),进而基于该第一训练语料序列训练待训练第一生成器,得到第一预设诗歌生成器。In a practicable manner, assume that the poetry training corpus is {s 1 , s 2 , s 3 , s 4 }, where the subscript “k” of s k is used to represent the poetry subscript corresponding to the poetry training corpus The position of the sentence in the poem, and then extract the keywords of the poetry training corpus to form the poetry keyword sequence (u 1 , u 2 , u 3 ... u s ), where the subscript "s" of u s is used to represent the translation training The importance level of the poetry keywords corresponding to the corpus, that is, keywords with higher importance levels are higher in the corresponding keyword sequence, and the extraction method can be based on translation or completely based on manual extraction, and then Obtain the corresponding translation topic sequence (e 1 , e 2 , e 3 ... e k ) after processing and editing the translation training corpus, and stitch it into the first training corpus sequence (u 1 , u 2 , u 3 …u s ,#,e 1 ,e 2 ,e 3 …e k ,&,s 1 ,s 2 ,s 3 …s k ), and then train the first generator to be trained based on the first training corpus sequence generator to get the first preset poem generator.

本申请实施例提供了一种诗歌生成方法,也即,获取诗歌描述信息;依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列;将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌。由于通过第一预设诗歌生成器可得到描述诗歌主题的候选子句的集合,也即通过第一预设诗歌生成器即可实现生成突出目标诗歌主题的候选子句的目的,进而通过第二预设诗歌生成器和用户输入的诗歌子句处理命令,对候选子句进行人机交互式调整,最终得到目标诗歌对应的目标诗句,也即,基于目标诗歌的诗歌描述信息,在第一预设诗歌生成器、第二预设诗歌生成器和用户命令的配合下,实现了得到诗歌描述信息对应的目标诗句的目的,由于第一预设诗歌生成器和第二预设诗歌生成器具备生成效率快及生成成本低等特性,进而使得目标诗句对应的候选子句的生成过程得到了保障,也即,实现了提升对于候选子句的创作效率,与此同时,由于用户相对于文本生成器而言,能够对候选子句的优劣性进行更为客观的评价,进而可使得迭代调整后得到的目标诗句更符合市场的需求,也即,通过文本生成器和用户之间的人机交互合作方式迭代处理候选子句,即可实现得到相较于文本生成器单一处理候选子句方式质量更高的目的,所以,实现了平衡诗歌创作效率和诗歌质量的目的,而非仅基于深度学习技术训练好的文本生成器生成用户需要的诗歌,所以克服了基于文本生成器构造的诗词生成系统,导致生成的诗歌的主题性较差的技术缺陷,所以,实现了对诗歌的创造效率和诗歌质量。The embodiment of the present application provides a poetry generation method, that is, to obtain the poem description information; according to the poem description information and the first preset poem generator, generate the theme vernacular sequence corresponding to the target poem; convert the theme vernacular sequence Input to the first preset poetry generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses is a set of candidate clauses describing the theme of the target poem; according to the second preset It is assumed that the poetry generator and the poetry clause processing command input by the user perform iterative adjustment on the candidate poetry clause sequence corresponding to the candidate poetry clause set to obtain the target poem. Since the set of candidate clauses describing the theme of poetry can be obtained through the first preset poetry generator, that is, the purpose of generating candidate clauses that highlight the theme of the target poetry can be achieved through the first preset poetry generator, and then through the second Preset the poem generator and the poetry clause processing command input by the user, adjust the candidate clauses interactively, and finally get the target poem corresponding to the target poem, that is, based on the poem description information of the target poem, in the first preset With the cooperation of the poem generator, the second preset poem generator and the user command, the purpose of obtaining the corresponding target verses of the poem description information is realized, because the first preset poem generator and the second preset poem generator have the ability to generate The characteristics of fast efficiency and low generation cost ensure that the generation process of the candidate clauses corresponding to the target verse is guaranteed, that is, the creation efficiency of the candidate clauses is improved. At the same time, due to the user’s relative to the text generator In other words, the pros and cons of candidate clauses can be evaluated more objectively, and then the target verses obtained after iterative adjustment can be more in line with the needs of the market, that is, through the human-computer interaction between the text generator and the user Iterative processing of candidate clauses in a cooperative manner can achieve the purpose of obtaining higher quality than the single processing of candidate clauses by text generators. Therefore, the purpose of balancing poetry creation efficiency and poetry quality is achieved, not only based on deep learning The technically trained text generator generates the poems that users need, so it overcomes the technical defect of the poetry generation system based on the text generator, which leads to poor thematicity of the generated poems. Therefore, it realizes the creation efficiency of poems and poetry quality.

实施例二Embodiment two

进一步地,参照图2,在本申请另一实施例中,与上述实施例一相同或相似的内容,可以参考上文介绍,后续不再赘述。在此基础上,在所述将诗歌训练语料集序列、所述诗歌关键字序列和所述诗歌主题序列共同拼接为诗歌训练语料序列的步骤之后,所述诗歌生成方法还包括:Further, referring to FIG. 2 , in another embodiment of the present application, for content that is the same as or similar to the first embodiment above, reference may be made to the introduction above, and details will not be repeated hereafter. On this basis, after the step of splicing together the poetry training corpus sequence, the poetry keyword sequence and the poetry theme sequence into a poetry training corpus sequence, the poetry generation method further includes:

步骤F10,依据第二预设拼接方式,对所述诗歌训练语料序列进行拼接调整,得到第二训练语料序列;Step F10, splicing and adjusting the poetry training corpus sequence according to the second preset splicing method to obtain a second training corpus sequence;

步骤F20,对所述第二训练语料序列进行掩码处理,得到目标训练语料序列;Step F20, performing mask processing on the second training corpus sequence to obtain a target training corpus sequence;

步骤F30,依据所述目标训练语料序列,对待训练第二生成器进行训练,得到第二预设诗歌生成器。Step F30, according to the target training corpus sequence, train the second generator to be trained to obtain a second preset poetry generator.

在本实施例中,需要说明的是,所述第二预设拼接方式用于表征以主题-诗歌子句为拼接顺序拼接的方式,其中,不同序列间用中间间隔符分开,在一种可实施的方式中,所述第二训练语料序列可以为(e1,e2,e3……ek,&,s1,s2,s3……sk),所述目标训练语料序列为通过预设训练算法进行掩码处理后的第二训练语料序列,例如,假设所述目标训练语料序列为(e1,e2,e3……ek,&,s1,s2,s3……sk *),则sk *为进行掩码的诗歌子句,为了和实际应用保持一致,可设遮挡位置为k1,k2……km,其中,“m”用于表征遮挡数量,1≤m≤M,“M”的取值为:五言诗歌为4,七言诗歌为5,为了保证诗歌生成系统的运行效率以及用户心理,此算法只对当前子句sk *进行掩码处理,其中,以目标训练语料序列训练待训练生成器时采用如下交叉熵损失函数:In this embodiment, it should be noted that the second preset splicing method is used to characterize the splicing method with theme-poetry clauses as splicing order, wherein different sequences are separated by intermediate spacers, in one possible In an implementation manner, the second training corpus sequence may be (e 1 , e 2 , e 3 ... e k , &, s 1 , s 2 , s 3 ... s k ), and the target training corpus sequence is the second training corpus sequence after masking processing by a preset training algorithm, for example, assuming that the target training corpus sequence is (e 1 , e 2 , e 3 ...... e k ,&, s 1 , s 2 , s 3 ... s k * ), then s k * is the poem clause for masking. In order to be consistent with the actual application, the masking position can be set as k 1 , k 2 ... k m , where "m" is represented by In order to represent the number of occlusions, 1≤m≤M, the value of "M" is: 4 for five-character poems, and 5 for seven-character poems. In order to ensure the operating efficiency of the poetry generation system and the user's psychology, this algorithm only applies to the current clause s k * Perform mask processing, where the following cross-entropy loss function is used when training the generator to be trained with the target training corpus sequence:

Figure BDA0003764439600000141
Figure BDA0003764439600000141

其中,s为,D1为诗歌训练语料集,k为子句序列号,K为目标诗句数量,i为遮挡的诗歌子句的字符,m为遮挡数量,softmax(G2(xk),ki)为对ki位置的遮挡字符进行softmax函数计算,

Figure BDA0003764439600000142
由于此算法输入中的某一部分始终保持不变,进而在保证了机器翻译优势的基础上,采用了随机遮挡解码,可实现对某一诗歌子句中不相邻的词语进行掩码处理。Among them, s is, D 1 is the poetry training corpus, k is the clause sequence number, K is the number of target verses, i is the character of the occluded poetry clause, m is the occluded number, softmax(G 2 (x k ), k i ) is to calculate the softmax function for the occluded character at k i position,
Figure BDA0003764439600000142
Because a certain part of the input of this algorithm remains unchanged, and on the basis of ensuring the advantages of machine translation, random occlusion decoding is used to realize the mask processing of non-adjacent words in a certain poem clause.

作为一种示例,步骤F10至步骤F30包括:依据以主题-诗歌子句为拼接顺序拼接的方式,对所述诗歌训练语料序列进行拼接调整,得到第二训练语料序列;对所述第二训练语料序列进行掩码处理,得到目标训练语料序列;依据所述目标训练语料序列,对待训练第二生成器进行训练,得到第二预设诗歌生成器,其中,所述待训练第二生成器可以为BERT-2等双向生成器。As an example, steps F10 to F30 include: splicing and adjusting the poetry training corpus sequence to obtain a second training corpus sequence in the manner of splicing the topic-poetry clauses in splicing order; The corpus sequence is masked to obtain the target training corpus sequence; according to the target training corpus sequence, the second generator to be trained is trained to obtain a second preset poetry generator, wherein the second generator to be trained can be Bidirectional generators such as BERT-2.

本申请实施例提供了一种诗歌生成器训练方法,也即,依据第二预设拼接方式,对所述诗歌训练语料序列进行拼接调整,得到第二训练语料序列,对所述第二训练语料序列进行掩码处理,得到目标训练语料序列,依据所述目标训练语料序列,对待训练第二生成器进行训练,得到第二预设诗歌生成器。相比于通过传统的文本生成训练方法对待训练第二生成器进行训练,本申请实施例可对随机地对当前诗歌子句的预设数量的字符进行掩码处理,由于只对当前诗歌子句进行掩码,进而可实现保证训练诗歌生成器的效率的目的,与此同时,由于该算法可对当前诗歌子句的预设数量的字符,也即,既可以对当前诗歌子句的相邻字符进行掩码处理,也可以为对当前诗歌子句的未相邻字符进行掩码处理,所以克服了现有技术对当前诗歌子句的未相邻字符进行掩码处理耗费时间长,进而导致训练生成器的效率低的技术缺陷,所以,为诗歌生成器的应用效果奠定了基础。The embodiment of the present application provides a poetry generator training method, that is, according to the second preset splicing method, the sequence of the poetry training corpus is spliced and adjusted to obtain the second sequence of training corpus, and the sequence of the second training corpus is The sequence is masked to obtain a target training corpus sequence, and according to the target training corpus sequence, the second generator to be trained is trained to obtain a second preset poetry generator. Compared with training the second generator to be trained through the traditional text generation training method, the embodiment of the present application can randomly mask the preset number of characters of the current poetry clause, because only the current poetry clause Masking, and then can achieve the purpose of ensuring the efficiency of the training poetry generator, at the same time, because the algorithm can be used for the preset number of characters of the current poetry clause, that is, both adjacent to the current poetry clause Characters are masked, and the non-adjacent characters of the current poetry clause can also be masked, so it overcomes the long time-consuming mask processing of the non-adjacent characters of the current poetry clause in the prior art, which leads to The low efficiency of the training generator has technical defects, so it lays the foundation for the application effect of the poetry generator.

实施例三Embodiment Three

本申请实施例还提供一种诗歌生成装置,参照图3,所述诗歌生成装置包括:The embodiment of the present application also provides a poem generation device, referring to Figure 3, the poem generation device includes:

获取模块,用于获取诗歌描述信息;Obtaining module, used to obtain poem description information;

生成模块,用于依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列;A generating module, configured to generate a theme vernacular sequence corresponding to the target poem according to the poem description information and the first preset poem generator;

输入模块,用于将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;An input module, configured to input the subject vernacular sequence into the first preset poem generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses describes the subject of the target poem The set of candidate clauses of ;

调整模块,用于依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌。The adjustment module is configured to iteratively adjust the candidate poetry clause sequence corresponding to the candidate poetry clause set according to the second preset poetry generator and the poetry clause processing command input by the user, so as to obtain the target poem.

可选地,所述用户输入的诗歌子句处理命令包括诗歌子句检测命令和诗歌子句评价命令,所述调整模块还用于:Optionally, the poetry clause processing command input by the user includes a poetry clause detection command and a poetry clause evaluation command, and the adjustment module is also used for:

依据所述候选诗歌子句集,确定所述目标诗歌的目标诗句数量;Determining the number of target verses of the target poem according to the set of candidate verses;

依据所述诗歌子句检测命令,检测所述候选诗歌子句集是否存在候选诗歌子句;According to the poetry clause detection command, detect whether there are candidate poetry clauses in the candidate poetry clause set;

若不存在,则返回执行步骤:将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;If it does not exist, then return to the execution step: input the subject vernacular sequence into the first preset poem generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses is described A collection of candidate clauses describing the subject of the target poem;

若存在,则依据所述诗歌子句评价命令和所述候选诗歌子句,对所述候选诗歌子句序列进行迭代更新,直至更新后的候选诗歌子句序列包含所述目标诗句数量的目标诗句序列;If it exists, according to the poetry clause evaluation command and the candidate poetry clauses, iteratively update the sequence of candidate poetry clauses until the updated sequence of candidate poetry clauses contains the target verses of the target number of verses sequence;

将所述更新后的候选诗歌子句序列中的目标诗句序列转换为所述目标诗句。converting the target verse sequence in the updated candidate verse clause sequence into the target verse sequence.

可选地,所述调整模块还用于:Optionally, the adjustment module is also used for:

依据所述第一诗歌子句评价命令,对所述候选诗歌子句进行评价编辑,得到评价编辑后的候选诗句;According to the evaluation command of the first poetry clause, the candidate poetry clause is evaluated and edited to obtain the candidate poetry sentence after the evaluation and editing;

依据所述第二诗歌子句评价命令,确定所述候选诗句是否为目标诗句;determining whether the candidate verse is a target verse according to the second verse clause evaluation command;

若是,则依据所述候选诗句,对所述候选诗歌子句序列进行更新;If so, then update the sequence of clauses of the candidate poems according to the candidate poems;

若否,则确定所述候选诗歌子句序列对应的候选诗句序列;If not, then determine the candidate verse sequence corresponding to the candidate verse clause sequence;

依据所述候选诗歌子句的子句序列号,将所述候选诗句序列进行处理,得到处理后的候选诗句序列;Processing the candidate verse sequence according to the clause sequence numbers of the candidate verse clauses to obtain the processed candidate verse sequence;

将处理后的候选诗句序列输入至所述第二预设诗歌生成器,得到目标诗句子句,并返回执行步骤:依据所述诗歌子句检测命令,检测所述候选诗歌子句集是否存在候选诗歌子句Input the processed candidate verse sequence to the second preset poetry generator to obtain the target verse sentence, and return to the execution step: according to the poetry clause detection command, detect whether there are candidate poems in the candidate poetry clause set clause

可选地,所述诗歌描述信息包括诗句数量描述信息和诗歌主题描述信息,所述生成模块还用于:Optionally, the poem description information includes the description information of the number of poems and the description information of the theme of the poem, and the generation module is also used for:

依据所述诗句数量描述信息,确定所述目标诗歌的目标诗句数量;Determining the target number of lines of the target poem according to the description information of the number of lines;

依据所述诗歌主题描述信息,确定所述目标诗歌的诗歌主题序列;Determining the poem theme sequence of the target poem according to the poem theme description information;

依据用户输入的候选子句处理命令,在所述第一预设诗歌生成器迭代输入所述诗歌主题序列,直至得到包含所述目标诗句数量的候选白话子句序列对应的候选主题序列;According to the candidate clause processing command input by the user, iteratively input the poem topic sequence in the first preset poetry generator until the candidate topic sequence corresponding to the candidate vernacular clause sequence containing the number of target verses is obtained;

对所述候选主题序列进行预处理,得到所述主题白话文序列。The candidate topic sequence is preprocessed to obtain the topic vernacular sequence.

可选地,所述用户输入的候选子句处理命令包括候选子句检测命令和候选子句修改命令,所述生成模块还用于:Optionally, the candidate clause processing command input by the user includes a candidate clause detection command and a candidate clause modification command, and the generating module is also used for:

将所述诗歌主题序列输入至所述第一预设诗歌生成器,生成候选白话子句集;inputting the poem theme sequence into the first preset poem generator to generate a set of candidate vernacular clauses;

依据所述候选子句检测命令,检测所述候选白话子句集是否存在候选白话子句;According to the candidate clause detection command, detect whether there are candidate vernacular clauses in the candidate vernacular clause set;

若不存在所述候选白话子句,则返回执行步骤:将所述诗歌主题序列输入至所述第一预设诗歌生成器,生成候选白话子句集;If the candidate vernacular clauses do not exist, return to the execution step: input the poem theme sequence to the first preset poetry generator to generate a set of candidate vernacular clauses;

若存在所述候选白话子句,则依据所述候选子句修改命令,对所述候选白话子句进行修改,得到目标白话子句;If the candidate vernacular clause exists, modify the candidate vernacular clause according to the candidate clause modification command to obtain the target vernacular clause;

依据所述目标白话子句,对所述诗歌主题序列进行迭代更新,直至更新后的诗歌主题序列具备所述目标诗句数量的候选白话子句序列。According to the target vernacular clauses, the poetry theme sequence is iteratively updated until the updated poetry theme sequence has the number of candidate vernacular clause sequences of the target verse.

可选地,所述诗歌生成装置还用于:Optionally, the poetry generating device is also used for:

获取诗歌训练语料集对应的诗歌关键字序列和译文训练语料集对应的诗歌主题序列,其中,所述诗歌训练语料集的诗歌训练语料和所述译文训练语料集的译文训练语料一一对应;Obtain the poetry keyword sequence corresponding to the poetry training corpus and the poetry theme sequence corresponding to the translation training corpus, wherein the poetry training corpus of the poetry training corpus is in one-to-one correspondence with the translation training corpus of the translation training corpus;

将诗歌训练语料集序列、所述诗歌关键字序列和所述诗歌主题序列共同拼接为诗歌训练语料序列;Splicing together the poetry training corpus sequence, the poetry keyword sequence and the poetry theme sequence into a poetry training corpus sequence;

依据第一预设拼接方式,对所述诗歌训练语料序列进行拼接调整,得到第一训练语料序列;According to the first preset splicing method, splicing and adjusting the poetry training corpus sequence to obtain the first training corpus sequence;

依据所述第一训练语料序列,对待训练第一生成器进行训练,得到第一预设诗歌生成器。According to the first training corpus sequence, the first generator to be trained is trained to obtain a first preset poetry generator.

可选地,所述诗歌生成装置还用于:Optionally, the poetry generating device is also used for:

依据第二预设拼接方式,对所述诗歌训练语料序列进行拼接调整,得到第二训练语料序列;According to the second preset splicing method, splicing and adjusting the poetry training corpus sequence to obtain the second training corpus sequence;

对所述第二训练语料序列进行掩码处理,得到目标训练语料序列;Perform mask processing on the second training corpus sequence to obtain a target training corpus sequence;

依据所述目标训练语料序列,对待训练第二生成器进行训练,得到第二预设诗歌生成器。According to the target training corpus sequence, the second generator to be trained is trained to obtain a second preset poetry generator.

本发明提供的诗歌生成装置,采用上述实施例中的诗歌生成方法,解决了难以兼顾诗歌的创作效率和诗歌质量的技术问题。与现有技术相比,本发明实施例提供的诗歌生成装置的有益效果与上述实施例提供的诗歌生成方法的有益效果相同,且该诗歌生成装置中的其他技术特征与上述实施例方法公开的特征相同,在此不做赘述。The poetry generation device provided by the present invention adopts the poetry generation method in the above-mentioned embodiments, and solves the technical problem that it is difficult to balance the efficiency of poetry creation and the quality of poetry. Compared with the prior art, the beneficial effect of the poem generating device provided by the embodiment of the present invention is the same as that of the poem generating method provided by the above embodiment, and other technical features in the poem generating device are the same as those disclosed by the method of the above embodiment The features are the same, and will not be repeated here.

实施例四Embodiment Four

本发明实施例提供一种电子设备,电子设备包括:至少一个处理器;以及,与至少一个处理器通信连接的存储器;其中,存储器存储有可被至少一个处理器执行的指令,指令被至少一个处理器执行,以使至少一个处理器能够执行上述实施例一中的基于电子说明书的设备控制方法。An embodiment of the present invention provides an electronic device. The electronic device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein, the memory stores instructions that can be executed by at least one processor, and the instructions are executed by at least one processor. The processor executes, so that at least one processor can execute the device control method based on the electronic manual in the first embodiment above.

下面参考图4,其示出了适于用来实现本公开实施例的电子设备的结构示意图。本公开实施例中的电子设备可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图4示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。Referring now to FIG. 4 , it shows a schematic structural diagram of an electronic device suitable for implementing an embodiment of the present disclosure. The electronic equipment in the embodiment of the present disclosure may include but not limited to such as mobile phone, notebook computer, digital broadcast receiver, PDA (personal digital assistant), PAD (tablet computer), PMP (portable multimedia player), vehicle terminal (such as mobile terminals such as car navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like. The electronic device shown in FIG. 4 is only an example, and should not limit the functions and scope of use of the embodiments of the present disclosure.

如图4所示,电子设备可以包括处理装置1001(例如中央处理器、图形处理器等),其可以根据存储在只读存储器(ROM)1002中的程序或者从存储装置1003加载到随机访问存储器(RAM)1004中的程序而执行各种适当的动作和处理。在RAM1004中,还存储有电子设备操作所需的各种程序和数据。处理装置1001、ROM1002以及RAM1004通过总线1005彼此相连。输入/输出(I/O)接口1006也连接至总线。As shown in FIG. 4 , the electronic device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may be loaded into a random access memory according to a program stored in a read-only memory (ROM) 1002 or from a storage device 1003. (RAM) 1004 to execute various appropriate actions and processing. In RAM 1004, various programs and data necessary for the operation of the electronic device are also stored. The processing device 1001 , ROM 1002 , and RAM 1004 are connected to each other via a bus 1005 . An input/output (I/O) interface 1006 is also connected to the bus.

通常,以下系统可以连接至I/O接口1006:包括例如触摸屏、触摸板、键盘、鼠标、图像传感器、麦克风、加速度计、陀螺仪等的输入装置1007;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置1008;包括例如磁带、硬盘等的存储装置1003;以及通信装置1009。通信装置可以允许电子设备与其他设备进行无线或有线通信以交换数据。虽然图中示出了具有各种系统的电子设备,但是应理解的是,并不要求实施或具备所有示出的系统。可以替代地实施或具备更多或更少的系统。Typically, the following systems can be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speakers, an output device 1008 of a vibrator or the like; a storage device 1003 including, for example, a magnetic tape, a hard disk, or the like; and a communication device 1009 . A communication device may allow an electronic device to communicate with other devices wirelessly or by wire to exchange data. While an electronic device is shown with various systems in the figures, it should be understood that implementing or having all of the systems shown is not a requirement. More or fewer systems may alternatively be implemented or provided.

特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1009从网络上被下载和安装,或者从存储装置1003被安装,或者从ROM1002被安装。在该计算机程序被处理装置1001执行时,执行本公开实施例的方法中限定的上述功能。In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, where the computer program includes program codes for executing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from the network via the communication means 1009, or from the storage means 1003, or from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.

本发明提供的电子设备,采用上述实施例中的基于电子说明书的设备控制方法,解决了控制电子说明书和智能设备操作界面完成配对的效率低的技术问题。与现有技术相比,本发明实施例提供的电子设备的有益效果与上述实施例提供的基于电子说明书的设备控制方法的有益效果相同,且该电子设备中的其他技术特征与上述实施例方法公开的特征相同,在此不做赘述。The electronic device provided by the present invention adopts the device control method based on the electronic instruction manual in the above-mentioned embodiments, and solves the technical problem of low efficiency of controlling the electronic instruction manual and the operation interface of the smart device to complete the pairing. Compared with the prior art, the beneficial effect of the electronic device provided by the embodiment of the present invention is the same as that of the device control method based on the electronic manual provided by the above embodiment, and other technical features of the electronic device are the same as those of the above embodiment method The disclosed features are the same and will not be repeated here.

应当理解,本公开的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式的描述中,具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。It should be understood that various parts of the present disclosure may be implemented in hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics may be combined in any one or more embodiments or examples in an appropriate manner.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. Should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

实施例五Embodiment five

本实施例提供一种计算机可读存储介质,具有存储在其上的计算机可读程序命令,计算机可读程序命令用于执行上述实施例一中的诗歌生成方法。This embodiment provides a computer-readable storage medium, which has computer-readable program commands stored thereon, and the computer-readable program commands are used to execute the poetry generation method in the first embodiment above.

本发明实施例提供的计算机可读存储介质例如可以是U盘,但不限于电、磁、光、电磁、红外线、或半导体的系统、系统或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本实施例中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被命令执行系统、系统或者器件使用或者与其结合使用。计算机可读存储介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。The computer-readable storage medium provided by the embodiments of the present invention may be, for example, a USB flash drive, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program, and the program may be used by or in conjunction with the command execution system, system or device. Program code embodied on a computer readable storage medium may be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

上述计算机可读存储介质可以是电子设备中所包含的;也可以是单独存在,而未装配入电子设备中。The above-mentioned computer-readable storage medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

上述计算机可读存储介质承载有一个或者多个程序,当上述一个或者多个程序被电子设备执行时,使得电子设备:获取诗歌描述信息;依据所述诗歌描述信息和第一预设诗歌生成器,生成目标诗歌对应的主题白话文序列;将所述主题白话文序列输入至所述第一预设诗歌生成器,得到所述目标诗歌对应的候选诗歌子句集,其中,所述候选诗歌子句集为描述所述目标诗歌主题的候选子句的集合;依据第二预设诗歌生成器和用户输入的诗歌子句处理命令,对所述候选诗歌子句集对应的候选诗歌子句序列进行迭代调整,得到所述目标诗歌。The above-mentioned computer-readable storage medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: acquires poem description information; according to the poem description information and the first preset poem generator , generating the subject vernacular sequence corresponding to the target poem; inputting the subject vernacular sequence to the first preset poetry generator to obtain a set of candidate poem clauses corresponding to the target poem, wherein the set of candidate poem clauses is description The set of candidate clauses of the target poetry theme; according to the second preset poetry generator and the poetry clause processing command input by the user, iteratively adjust the candidate poetry clause sequence corresponding to the candidate poetry clause set to obtain the Describe the target poem.

可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。Computer program code for carrying out the operations of the present disclosure can be written in one or more programming languages, or combinations thereof, including object-oriented programming languages—such as Java, Smalltalk, C++, and conventional Procedural Programming Language - such as "C" or a similar programming language. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (such as through an Internet Service Provider). Internet connection).

附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行命令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机命令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable command. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved. It should also be noted that each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations, can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or can be implemented with a combination of dedicated hardware and computer commands.

描述于本公开实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,模块的名称在某种情况下并不构成对该单元本身的限定。The modules involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the module does not constitute a limitation of the unit itself under certain circumstances.

本发明提供的计算机可读存储介质,存储有用于执行上述诗歌生成方法的计算机可读程序命令,解决了难以兼顾诗歌的创作效率和诗歌质量的技术问题。与现有技术相比,本发明实施例提供的计算机可读存储介质的有益效果与上述实施例提供的诗歌生成方法的有益效果相同,在此不做赘述。The computer-readable storage medium provided by the present invention stores computer-readable program commands for executing the above-mentioned poem generation method, which solves the technical problem that it is difficult to take into account both poetry creation efficiency and poetry quality. Compared with the prior art, the beneficial effect of the computer-readable storage medium provided by the embodiment of the present invention is the same as the beneficial effect of the poetry generating method provided by the above-mentioned embodiment, and will not be repeated here.

实施例六Embodiment six

本申请还提供一种计算机程序产品,包括计算机程序,所述计算机程序被处理器执行时实现如上述的诗歌生成方法的步骤。The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the above poetry generation method are implemented.

本申请提供的计算机程序产品解决了难以兼顾诗歌的创作效率和诗歌质量的技术问题。与现有技术相比,本发明实施例提供的计算机程序产品的有益效果与上述实施例提供的诗歌生成方法的有益效果相同,在此不做赘述。The computer program product provided by this application solves the technical problem that it is difficult to balance the efficiency of poetry creation and the quality of poetry. Compared with the prior art, the beneficial effect of the computer program product provided by the embodiment of the present invention is the same as that of the method for generating poetry provided by the above embodiment, and will not be repeated here.

以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利处理范围内。The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structures or equivalent process transformations made by using the description of the application and the accompanying drawings are directly or indirectly used in other related technical fields. , are all included in the patent processing scope of the present application in the same way.

Claims (10)

1. A poetry generating method, characterized in that the poetry generating method comprises:
acquiring poetry description information;
generating a theme white language sequence corresponding to the target poetry according to the poetry description information and a first preset poetry generator;
inputting the subject whispering text sequence into the first preset poetry generator to obtain a candidate poetry clause set corresponding to the target poetry, wherein the candidate poetry clause set is a set of candidate clauses describing the subject of the target poetry;
and iteratively adjusting the candidate poetry clause sequence corresponding to the candidate poetry clause set according to a second preset poetry generator and a poetry clause processing command input by a user to obtain the target poetry.
2. The poetry generating method as claimed in claim 1, wherein said poetry clause processing commands input by the user include poetry clause detecting commands and poetry clause evaluating commands,
the step of iteratively adjusting the candidate poetry clause sequence corresponding to the candidate poetry clause set according to a second preset poetry generator and a poetry clause processing command input by a user to obtain the target poetry comprises the following steps:
determining the number of target poetry sentences of the target poetry according to the candidate poetry sentence clause set;
detecting whether the candidate poetry clause set has a candidate poetry clause or not according to the poetry clause detection command;
if not, returning to the execution step: inputting the theme Chinese sequence to the first preset poetry generator to obtain a candidate poetry clause set corresponding to the target poetry, wherein the candidate poetry clause set is a set of candidate clauses describing the theme of the target poetry;
if the poetry clause sequence exists, carrying out iterative updating on the candidate poetry clause sequence according to the poetry clause evaluation command and the candidate poetry clauses until the updated candidate poetry clause sequence contains the target poetry clause sequence with the number of the target poetry clauses;
and converting the target verse sequence in the updated candidate verse clause sequence into the target verse.
3. The poetry generating method as claimed in claim 2, wherein said step of iteratively updating the sequence of the candidate poetry clauses according to the poetry clause evaluation command and the candidate poetry clauses until the updated sequence of the candidate poetry clauses includes the sequence of the target poetry clauses with the number of the target poetry clauses comprises:
evaluating and editing the candidate poetry clauses according to the first poetry clause evaluation command to obtain the evaluated and edited candidate poetry clauses;
determining whether the candidate poetry sentence is a target poetry sentence according to the second poetry clause evaluation command;
if yes, updating the candidate poetry clause sequence according to the candidate poetry clauses;
if not, determining a candidate poetry sentence sequence corresponding to the candidate poetry sentence sequence;
processing the candidate poetry sentence sequence according to the clause serial number of the candidate poetry clause to obtain a processed candidate poetry sentence sequence;
inputting the processed candidate poetry sentence sequence into the second preset poetry generator to obtain a target poetry sentence clause, and returning to the executing step: and detecting whether the candidate poetry clause set has the candidate poetry clauses or not according to the poetry clause detection command.
4. The poetry generating method as claimed in claim 1, wherein said poetry description information includes poetry quantity description information and poetry theme description information,
the step of generating the theme white language sequence corresponding to the target poetry according to the poetry description information and the first preset poetry generator comprises the following steps:
determining the target poetry sentence number of the target poetry according to the poetry sentence number description information;
determining a poetry theme sequence of the target poetry according to the poetry theme description information;
iteratively inputting the poetry theme sequence in the first preset poetry generator according to a candidate clause processing command input by a user until a candidate theme sequence corresponding to the candidate white clause sequence containing the target poetry sentence number is obtained;
and preprocessing the candidate theme sequence to obtain the theme white language sequence.
5. The poetry generating method according to claim 4, wherein said user-inputted candidate clause processing commands include a candidate clause detecting command and a candidate clause modifying command,
the step of iteratively inputting the poetry theme sequence in the first preset poetry generator according to the candidate clause processing command input by the user until obtaining the candidate theme sequence corresponding to the candidate white clause sequence containing the target poetry sentence number comprises the following steps:
inputting the poetry theme sequence into the first preset poetry generator to generate a candidate white-speech clause set;
detecting whether the candidate white-language clause set has a candidate white-language clause or not according to the candidate clause detection command;
if the candidate white clause does not exist, returning to the execution step: inputting the poetry theme sequence into the first preset poetry generator to generate a candidate white-language clause set;
if the candidate white-language clause exists, modifying the candidate white-language clause according to the candidate clause modification command to obtain a target white-language clause;
and iteratively updating the poetry theme sequence according to the target white words, until the updated poetry theme sequence has the candidate white words clause sequence with the target poetry clause number.
6. The poetry generating method as claimed in claim 1, wherein before said step of obtaining poetry descriptive information, said poetry generating method further comprises:
acquiring a poetry keyword sequence corresponding to a poetry training corpus and a poetry theme sequence corresponding to a translation training corpus, wherein poetry training corpuses of the poetry training corpus correspond to translation training corpuses of the translation training corpus one by one;
splicing a poetry training corpus sequence, the poetry keyword sequence and the poetry theme sequence into a poetry training corpus sequence;
splicing and adjusting the poetry training corpus sequence according to a first preset splicing mode to obtain a first training corpus sequence;
and training a first generator to be trained according to the first training corpus sequence to obtain a first preset poetry generator.
7. The method of generating poetry as claimed in claim 1, wherein after said step of concatenating a poetry training corpus sequence, said poetry keyword sequence and said poetry topic sequence into a poetry training corpus sequence, said method of generating poetry further comprises:
splicing and adjusting the poetry training corpus sequence according to a second preset splicing mode to obtain a second training corpus sequence;
performing mask processing on the second corpus sequence to obtain a target corpus sequence;
and training a second generator to be trained according to the target training corpus sequence to obtain a second preset poetry generator.
8. A poetry generating apparatus, characterized in that the poetry generating apparatus comprises:
the acquisition module is used for acquiring poetry description information;
the generating module is used for generating a theme white language sequence corresponding to the target poetry according to the poetry description information and a first preset poetry generator;
the input module is used for inputting the subject white language sequence into the first preset poetry generator to obtain a candidate poetry clause set corresponding to the target poetry, wherein the candidate poetry clause set is a set of candidate clauses describing the subject of the target poetry;
and the adjusting module is used for iteratively adjusting the candidate poetry clause sequence corresponding to the candidate poetry clause set according to a second preset poetry generator and a poetry clause processing command input by a user to obtain the target poetry.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the poetry generation method of any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a program implementing a poetry generating method, which is executed by a processor to implement the steps of the poetry generating method as recited in any one of claims 1 to 7.
CN202210885016.XA 2022-07-26 2022-07-26 Poetry generation method, device, electronic device and readable storage medium Active CN115310426B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210885016.XA CN115310426B (en) 2022-07-26 2022-07-26 Poetry generation method, device, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210885016.XA CN115310426B (en) 2022-07-26 2022-07-26 Poetry generation method, device, electronic device and readable storage medium

Publications (2)

Publication Number Publication Date
CN115310426A true CN115310426A (en) 2022-11-08
CN115310426B CN115310426B (en) 2024-11-22

Family

ID=83858582

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210885016.XA Active CN115310426B (en) 2022-07-26 2022-07-26 Poetry generation method, device, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN115310426B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110134968A (en) * 2019-05-22 2019-08-16 网易(杭州)网络有限公司 Poem generation method, device, equipment and storage medium based on deep learning
WO2019174186A1 (en) * 2018-03-15 2019-09-19 平安科技(深圳)有限公司 Automatic poem generation method and apparatus, and computer device and storage medium
CN111368056A (en) * 2020-03-04 2020-07-03 北京香侬慧语科技有限责任公司 Ancient poetry generation method and device
CN112101006A (en) * 2020-09-14 2020-12-18 中国平安人寿保险股份有限公司 Poetry generation method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019174186A1 (en) * 2018-03-15 2019-09-19 平安科技(深圳)有限公司 Automatic poem generation method and apparatus, and computer device and storage medium
CN110134968A (en) * 2019-05-22 2019-08-16 网易(杭州)网络有限公司 Poem generation method, device, equipment and storage medium based on deep learning
CN111368056A (en) * 2020-03-04 2020-07-03 北京香侬慧语科技有限责任公司 Ancient poetry generation method and device
CN112101006A (en) * 2020-09-14 2020-12-18 中国平安人寿保险股份有限公司 Poetry generation method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN115310426B (en) 2024-11-22

Similar Documents

Publication Publication Date Title
JP7421604B2 (en) Model pre-training method and device, text generation method and device, electronic equipment, storage medium and computer program
CN108984683B (en) Method, system, equipment and storage medium for extracting structured data
CN110287278A (en) Comment on generation method, device, server and storage medium
US20140028780A1 (en) Producing content to provide a conversational video experience
CN111563390B (en) Text generation method and device and electronic equipment
CN104681023A (en) Information processing method and electronic equipment
CN104252861A (en) Video voice conversion method, video voice conversion device and server
CN103956167A (en) Visual sign language interpretation method and device based on Web
CN112287698B (en) Chapter translation method and device, electronic equipment and storage medium
CN111142667A (en) System and method for generating voice based on text mark
CN117765132A (en) Image generation method, device, equipment and storage medium
US12229519B2 (en) Method and apparatus for generating dialogue state
CN116913278B (en) Voice processing method, device, equipment and storage medium
JP2022537860A (en) Voice packet recommendation method, device, electronic device and program
CN113591472A (en) Lyric generation method, lyric generation model training method and device and electronic equipment
CN116193052B (en) Video synthesis method, device, storage medium and electronic equipment
CN117390165A (en) Diagram question and answer methods, systems, media and equipment based on multi-modal large models
CN112289298A (en) Method, device, storage medium and electronic device for processing synthesized speech
US11615714B2 (en) Adaptive learning in smart products based on context and learner preference modes
CN117726720B (en) Image editing method, device, electronic device and readable storage medium
CN115310426A (en) Poetry generation method and device, electronic equipment and readable storage medium
CN118365730A (en) Method, device, equipment and storage medium for generating text graph
CN117649570A (en) Model training method, image generating device and electronic equipment
CN113704488B (en) Content generation method and device, electronic equipment and storage medium
CN117809649A (en) Display device and semantic analysis method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant