CN113033182B - Text creation assisting method, device and server - Google Patents

Text creation assisting method, device and server Download PDF

Info

Publication number
CN113033182B
CN113033182B CN202110324256.8A CN202110324256A CN113033182B CN 113033182 B CN113033182 B CN 113033182B CN 202110324256 A CN202110324256 A CN 202110324256A CN 113033182 B CN113033182 B CN 113033182B
Authority
CN
China
Prior art keywords
text
model
modified
vocabulary
auxiliary
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.)
Active
Application number
CN202110324256.8A
Other languages
Chinese (zh)
Other versions
CN113033182A (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.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202110324256.8A priority Critical patent/CN113033182B/en
Publication of CN113033182A publication Critical patent/CN113033182A/en
Application granted granted Critical
Publication of CN113033182B publication Critical patent/CN113033182B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/68Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/683Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content
    • G06F16/685Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using metadata automatically derived from the content using automatically derived transcript of audio data, e.g. lyrics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • 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)
  • Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • Library & Information Science (AREA)
  • Data Mining & Analysis (AREA)
  • Multimedia (AREA)
  • Biophysics (AREA)
  • Databases & Information Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Probability & Statistics with Applications (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Machine Translation (AREA)

Abstract

The invention provides an auxiliary method, a device and a server for text creation, which relate to the technical field of deep learning and comprise the following steps: determining a target authoring auxiliary model from an authoring auxiliary model set obtained through pre-training; acquiring text attribute parameters, and generating a manuscript text based on the text attribute parameters through a target authoring auxiliary model; determining a target modification auxiliary model from a modification auxiliary model set obtained through pre-training; determining a text to be modified and modification parameters corresponding to the text to be modified based on the manuscript text, and generating a modified text according to the text to be modified and the modification parameters through a target modification auxiliary model; the target text is determined from the manuscript text and the modified text. The invention can better assist the user to perform high-efficiency creation, and simultaneously, the generated text better meets the user requirement.

Description

Text creation assisting method, device and server
Technical Field
The invention relates to the technical field of deep learning, in particular to an auxiliary method, an auxiliary device and a server for text creation.
Background
With the development of deep learning technology, various research directions of natural language processing technology have been greatly advanced, wherein artificial intelligent creation of industrial application is an important and popular application direction of natural language processing technology, such as intelligent creation of poems, lyrics, novels, news manuscripts, and the like. However, since literary works creation involves aesthetic human and creative human, not only the combination of thesaurus on statistical law based on historical data, but also the feeling of human on fresh things and specific scenes are integrated, and these are just the capability of artificial intelligence creation which is still lacking. In addition, artificial intelligence authoring often has problems of contextually contradictory or centerless ideas when authoring longer text. In summary, the text generated by the existing artificial intelligence authoring cannot meet the user requirements.
Disclosure of Invention
In view of the above, the present invention aims to provide an auxiliary method, apparatus and server for text creation, which can better assist a user in efficient creation, and make the generated text better meet the user's requirements.
In a first aspect, an embodiment of the present invention provides an auxiliary method for text authoring, where the method includes: determining a target authoring auxiliary model from an authoring auxiliary model set obtained through pre-training; acquiring text attribute parameters, and generating a manuscript text based on the text attribute parameters through the target authoring auxiliary model; determining a target modification auxiliary model from a modification auxiliary model set obtained through pre-training; determining a text to be modified and modification parameters corresponding to the text to be modified based on the initial draft text, and generating a modified text according to the text to be modified and the modification parameters through the target modification auxiliary model; and determining target text according to the initial draft text and the modified text.
In one embodiment, the set of authoring assistance models includes one or more of an overall recommendation model, a narrative recommendation model, a real-time recommendation model; the types of the text attribute parameters comprise one or more of text characteristics, scenario description text and upper Wen Shangou text; the types of text attribute parameters corresponding to different authoring auxiliary models are different.
In one embodiment, the type of the text attribute parameter corresponding to the overall recommendation model is a text feature, and the text feature includes a content control feature and a format control feature; the step of generating the manuscript text based on the text attribute parameters through the target authoring assistance model comprises the following steps: if the target creation auxiliary model is the integral recommendation model, inputting the text features into the integral recommendation model, encoding based on the content control features by an encoder in the integral recommendation model to obtain a first encoding result, and decoding the first encoding result based on the format control features by a decoder in the integral recommendation model to obtain a manuscript text; wherein, the overall recommendation model adopts a seq2seq model; the content control features at least comprise text styles, text moods and text labels; the format control feature includes at least text vowels and paragraph attributes.
In one embodiment, the type of text attribute parameter corresponding to the narrative recommendation model is a scenario description text; the step of generating the manuscript text based on the text attribute parameters through the target authoring assistance model comprises the following steps: if the target creation auxiliary model is the narrative recommendation model, inputting the scenario description text into the narrative recommendation model, encoding the scenario description text through an encoder in the narrative recommendation model to obtain a second encoding result, and decoding the second encoding result through a decoder in the narrative recommendation model to obtain a manuscript text; wherein the narrative recommendation model employs a seq2seq model.
In one embodiment, the type of the text attribute parameter corresponding to the real-time recommendation model is the text of the single sentence above; the step of generating the manuscript text based on the text attribute parameters through the target authoring assistance model comprises the following steps: if the target authoring auxiliary model is the real-time recommendation model, inputting the upper Wen Shangou text into the real-time recommendation model, generating one or more lower sentence texts based on the upper Wen Shangou text through the real-time recommendation model, and taking the combination of the upper Wen Shangou text and each lower Wen Shangou text as a manuscript text; wherein, the real-time recommendation model adopts an autoregressive language model.
In one embodiment, the set of modified auxiliary models includes one or more of a paragraph recommendation model, a single sentence text recommendation model, and a vocabulary recommendation model.
In one embodiment, if the target modification auxiliary model is the paragraph recommendation model, the text to be modified includes paragraph up and down text; the step of generating the modified text according to the text to be modified and the modification parameters through the target modification auxiliary model comprises the following steps: inputting the paragraph up-down text and the modification parameters into the paragraph recommendation model, and modifying the paragraph up-down text according to the modification parameters through the paragraph recommendation model to obtain one or more modified texts; the modification parameters comprise a first keyword, paragraph line numbers, paragraph word numbers, paragraph vowels and paragraph tones; wherein, the paragraph recommendation model adopts a seq2seq model.
In one embodiment, if the target modification auxiliary model is the sentence text recommendation model, the text to be modified includes the sentence text to be modified; the step of generating the modified text according to the text to be modified and the modification parameters through the target modification auxiliary model comprises the following steps: inputting the single sentence text to be modified, the modification parameters, a first upper single sentence text and a first lower single sentence text corresponding to the single sentence text to be modified into the single sentence text recommendation model, and modifying the single sentence text to be modified according to the first upper single sentence text, the first lower single sentence text and the modification parameters through the single sentence text recommendation model to obtain one or more modified texts; the modification parameters comprise a second keyword, the number of words of a single sentence, the vowel footage of the single sentence and the tone of the single sentence; the single sentence text recommendation model adopts a seq2seq model.
In one embodiment, if the modification auxiliary model is the vocabulary recommendation model, the text to be modified includes a vocabulary to be modified; the step of generating the modified text according to the text to be modified and the modification parameters through the target modification auxiliary model comprises the following steps: inputting the vocabulary to be modified, the modification parameters, a second upper single sentence text and a second lower Wen Shangou text corresponding to the single sentence text of the vocabulary to be modified into the vocabulary recommendation model, and outputting one or more modified texts according to the vocabulary to be modified, the modification parameters, the second upper single sentence text and the second lower Wen Shangou text through the vocabulary recommendation model; the modification parameters comprise vocabulary vowels and vocabulary tones; the modified text comprises one or more of a first vocabulary, a second vocabulary and a third vocabulary, wherein the first vocabulary is a replacement vocabulary meeting the modification parameters, the second vocabulary is an intention vocabulary meeting the modification parameters, and the third vocabulary is a hyponym vocabulary and/or an anticnym vocabulary corresponding to the vocabulary to be modified.
In one embodiment, the method further comprises: acquiring the selected words and the rhyme limiting rules uploaded by the user; outputting a plurality of rhyme vocabularies according to the selected words and the rhyme limiting rules through a pre-configured rhyme auxiliary function; calculating the heat value of each rhyme vocabulary based on the rhyme times of each rhyme vocabulary, and sequencing each rhyme vocabulary according to the heat value of each rhyme vocabulary; and determining the target rhyme vocabulary corresponding to the selected word from the rhyme vocabularies according to the ordering result.
In one embodiment, the method further comprises: acquiring a text to be retrieved uploaded by the user; the text to be searched comprises words to be searched or single sentence text to be searched; if the text to be searched comprises the vocabulary to be searched, searching a plurality of first selectable single sentence texts through a preconfigured inspiration search auxiliary function; wherein the first selectable single sentence text contains the vocabulary to be searched; if the text to be searched comprises the single sentence text to be searched, searching a plurality of second selectable single sentence texts through the inspiration search auxiliary function; and the similarity between the second selectable single sentence text and the single sentence text to be searched is higher than a preset similarity threshold value.
In one embodiment, the target text includes at least lyric text.
In a second aspect, an embodiment of the present invention further provides an auxiliary apparatus for text authoring, the apparatus including: the first model determining module is used for determining a target authoring auxiliary model from the authoring auxiliary model set obtained through pre-training; the manuscript generation module is used for acquiring text attribute parameters and generating manuscript texts based on the text attribute parameters through the target creation auxiliary model; the second model determining module is used for determining a target modification auxiliary model from a modification auxiliary model set obtained through pre-training; the manuscript modification module is used for determining a text to be modified and modification parameters corresponding to the text to be modified based on the manuscript text, and generating a modified text according to the text to be modified and the modification parameters through the target modification auxiliary model; and the text determining module is used for determining target text according to the manuscript text and the modified text.
In a third aspect, an embodiment of the present invention further provides a server, including a processor and a memory; the memory has stored thereon a computer program which, when executed by the processor, performs the method according to any of the first aspects provided.
In a fourth aspect, embodiments of the present invention also provide a computer storage medium storing computer software instructions for use with any of the methods provided in the first aspect.
According to the auxiliary method, the device and the server for text creation, the target creation auxiliary model is determined from the creation auxiliary model set obtained through training in advance, the target modification auxiliary model is determined from the modification auxiliary model set obtained through training in advance, if the text attribute parameters are obtained, the initial draft text is generated through the target creation auxiliary model based on the text attribute parameters, the text to be modified and the modification parameters corresponding to the text to be modified are determined based on the initial draft text, and therefore the modified text is generated through the target modification auxiliary model according to the text to be modified and the modification parameters, and the target text is determined according to the initial draft text and the modified text. The method utilizes the authoring auxiliary model set and the modification auxiliary model set to realize collaborative authoring of the user and the AI (Artificial Intelligence ), generates corresponding manuscript text based on text attribute parameters through the target authoring auxiliary model, modifies the text to be modified in the manuscript text based on the modification parameters through the target modification auxiliary model, and accordingly obtains target text required by the user.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of an auxiliary method for text creation according to an embodiment of the present invention;
FIG. 2 is a block diagram of an intelligent lyrics auxiliary authoring system according to an embodiment of the present invention;
FIG. 3 is an auxiliary functional diagram of an authoring stage according to an embodiment of the present invention;
FIG. 4 is a functional diagram illustrating a modification stage according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of an auxiliary tool according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an auxiliary device for text creation according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described in conjunction with the embodiments, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Currently, various research directions of natural language processing technologies have relatively great progress, such as neural machine translation, natural language understanding, text classification, text generation, and the like. In addition, in recent years, the application of the pre-training language model in natural language processing is more and more widespread, and because the neural network parameters are more and the pre-training is performed on a large-scale text, the pre-training language model aims at learning the most basic statistical features in the natural language, and has higher language fluency and long text relevance. When the pre-training language model is used as an initialization parameter of a downstream task model, fine adjustment is performed, text features can be learned in pre-training, and learning can be performed aiming at the downstream task, so that a better result can be obtained.
In practical applications, lyrics creation is the key direction of artificial intelligence creation research. In the prior art, the lyrics creation mainly comprises two modes of human lyrics creation and AI lyrics creation, and the characteristics of the human lyrics creation and the AI lyrics creation are respectively stated: (1) human authored lyrics: first, a central idea is determined, and then, a chorus and a chorus are written around the central idea, wherein the chorus is an essence part of a song, and generally, the emotion or the idea of an creator is directly expressed. In practice, the creator can continuously modify the lyrics after writing the lyrics draft, so as to achieve better word use, rhyme use, account checking, or melody matching. In the whole lyrics creation process, the creator may refer to other data to assist the creator to create the lyrics, such as finding rhyme words by referring to a dictionary, helping language expression or triggering inspiration by referring to a high-quality work, so that the lyrics creation process is time-consuming and labor-consuming, and especially for the creator with insufficient experience, the lyrics creation is a challenging thing. (2) AI authoring lyrics: the main principle of AI creating lyrics is that a large number of lyrics are expected to be input into a deep learning model (such as an autoregressive language model), the deep learning model learns the statistical characteristics of natural language through optimized parameters, and the whole lyric text is generated according to character iteration, namely the AI creating lyrics are mainly based on statistical rules, after learning a large number of lyric text, the deep learning model can learn the occurrence rules among characters, and can give out the probability of each character at the current position based on context, so that a smoother text is generated.
By combining the characteristics of the human authored lyrics and the AI authored lyrics, the defects of the human authored lyrics and the AI authored lyrics can be summarized, and the specific steps are as follows: (1) human authored lyrics: although better at logic and creative, it is limited by the memory level of the creator. Moreover, human authored lyrics are usually after a large number of works are read, at this time, the author is more likely to accumulate experience and generate new inspiration, and produce better literary works, however, the accumulated experience not only needs a longer time, but also increases the difficulty of the beginner to produce high-quality lyrics. In addition, in the creation process, the lyrics can be more coherent by consulting the data or relying on experience, so that the sentences can be more rhyme. However, memorizing a large number of works and lyrics rhyme is very simple for AI. (2) AI authoring lyrics: although AI authored lyrics have good language statistics knowledge and super strong memory and can write out graceful and smooth sentences, AI lacks the creativity of language, and it is difficult to generate a new creative expression mode based on the existing knowledge expected to learn, and the artistry of literary works is creative. In addition, in the process of creating lyrics by using AI, there is usually no clear center point, which may cause a problem of contradiction between the generated text and the context, and the AI has difficulty in identifying the situation of inconsistent logic, which is easy for human beings.
Based on the above, the implementation of the invention provides an auxiliary method, an auxiliary device and a server for text creation, which can better assist a user in high-efficiency creation and enable the generated text to better meet the user demands.
For the understanding of the present embodiment, first, a detailed description will be given of an auxiliary method for text authoring disclosed in the embodiment of the present invention, referring to a schematic flow chart of an auxiliary method for text authoring shown in fig. 1, the method mainly includes the following steps S102 to S110:
step S102, determining a target authoring auxiliary model from the authoring auxiliary model set obtained through pre-training. In one embodiment, the identification of each authoring auxiliary model in the authoring auxiliary model set may be displayed through a preset page, wherein the authoring auxiliary model set may include a plurality of authoring auxiliary models such as an overall recommendation model, a narrative recommendation model, a real-time recommendation model and the like, and a user may select a required authoring auxiliary model from the displayed identifications as a target authoring auxiliary model, for example, the authoring auxiliary model corresponding to the user touch operation or the clicking operation is used as the target authoring auxiliary model.
Step S104, obtaining text attribute parameters, and generating a manuscript text based on the text attribute parameters through the target authoring auxiliary model. In one embodiment, the types of text attribute parameters corresponding to different authoring auxiliary models are different, and the text attribute parameters uploaded by the user aiming at the target authoring auxiliary model can be obtained. For example, the type of the text attribute parameter corresponding to the overall recommendation model is a text feature, and the text feature can be used for describing the features such as text emotion, text style and the like, so that a draft text conforming to the text feature is generated through the overall recommendation model; the type of the text attribute parameter corresponding to the narrative recommendation model is a plot description text which can be used for describing a story plot so as to generate a corresponding initial draft text according to the story plot through the narrative recommendation model; the type of the text attribute parameter corresponding to the real-time recommendation model is the text of the upper sentence, so that the real-time recommendation model is used for generating the text of the lower sentence which is smoothly connected with the text of the upper sentence. Optionally, the user can be prompted through a preset page to upload text attribute parameters corresponding to the target authoring auxiliary model, so that the required text attribute parameters are obtained, and a corresponding manuscript text is generated.
Step S106, determining a target modification auxiliary model from the modification auxiliary model set obtained through pre-training. In one embodiment, the identification of each modification auxiliary model in the modification auxiliary model set can be displayed through a preset page, wherein the modification auxiliary model set can comprise a plurality of modification auxiliary models such as paragraph recommendation models, single sentence text recommendation models, vocabulary recommendation models and the like, so that a user can conveniently select a required creation auxiliary model from the preset page as a target to create the auxiliary model.
Step S108, determining the text to be modified and the modification parameters corresponding to the text to be modified based on the manuscript text, and generating the modified text according to the text to be modified and the modification parameters through the target modification auxiliary model. In an alternative embodiment, the first draft text may be displayed so that the user may select a text to be modified and moistened from the first draft text, where the text is the text to be modified, and the text to be modified may include a paragraph context, a text to be modified, a word to be modified, or the like, and for different texts to be modified, the user may need to upload different modification parameters, and input the text to be modified and the modification parameters into the target modification auxiliary model, so as to output the corresponding modified text by using the target modification auxiliary model.
Step S110, determining target text according to the manuscript text and the modified text. The target text at least comprises lyric text, and can also comprise a literary text, a poetry text, a composition text and the like. In one embodiment, the text to be modified in the manuscript text is replaced by the modified text, so that the required target text can be obtained.
Considering that the artificial intelligence authoring technology is better than statistical analysis, the artificial intelligence authoring technology can be understood to be strong in 'memory', but lacks understanding of things, and human logic and understanding capability are strong, but lacks memorizing a large amount of texts.
For lyrics creation as an example, in the prior art, lyrics creation typically requires iterative modification of a lyrics draft until satisfied. To this end, embodiments of the present invention divide lyrics authoring into two stages of authoring and modification, and utilize artificial intelligence authoring to assist the author and promote the efficiency of both stages of authoring. In one embodiment, the above-mentioned text authoring assisting method may be applied to an intelligent lyrics assisting authoring system, referring to a framework diagram of the intelligent lyrics assisting authoring system shown in fig. 2, where the intelligent lyrics assisting authoring system is configured with an authoring assisting model set of an authoring stage and a modifying assisting model set of a modifying stage, the authoring stage includes an authoring assisting model for implementing assisting functions such as overall recommendation, narrative recommendation, real-time recommendation, etc., the authoring assisting model in the authoring assisting model set may be used for assisting a user in generating a first draft text in the authoring stage, the modifying stage includes a modifying assisting model for implementing assisting functions such as paragraph recommendation, sentence recommendation, vocabulary recommendation, etc., and the modifying assisting model in the modifying assisting model set may be used for assisting a user in modifying paragraphs, sentences, vocabularies in the first draft text in the modifying stage, so as to obtain a target text meeting user requirements. In addition, fig. 2 also illustrates that the intelligent lyrics auxiliary creation system is further configured with a rhyme auxiliary tool and a inspiration search auxiliary function to provide a required rhyme vocabulary for a user or excite the user inspiration. When the method is specifically implemented, primary lyrics (namely, the primary manuscript text) are mainly produced in the authoring stage, the primary lyrics specifically show ideas and organization structures which are needed to be expressed in the whole lyrics, the modification stage is mainly used for modifying and moisturizing paragraphs, sentences and vocabularies of the primary lyrics, and in addition, in the authoring stage and the modification stage, the user needs tools such as rhyme assisting tools, inspiration searching assisting functions and the like to assist in searching related information so as to facilitate efficient authoring.
For the authoring stage, the authoring auxiliary model set provided by the embodiment of the invention comprises one or more of an overall recommendation model, a narrative recommendation model and a real-time recommendation model, and the types of the text attribute parameters comprise one or more of text characteristics, scenario description texts and upper Wen Shangou texts, wherein the types of the text attribute parameters corresponding to different authoring auxiliary models are different. For example, the type of the text attribute parameter corresponding to the overall recommendation model is a text feature, the type of the text attribute parameter corresponding to the narrative recommendation model is a scenario description text, and the type of the text attribute parameter corresponding to the real-time recommendation model is the above single sentence text.
For ease of understanding, referring to an auxiliary functional diagram of an authoring stage shown in fig. 3, based on this, embodiments of the present invention provide some implementations of generating a manuscript text based on text attribute parameters by a target authoring auxiliary model, see the following modes (one) to (three):
mode (one), overall recommendation: the overall recommendation is aimed at a user without word writing basis and without thought to be expressed specifically, at the moment, the user only needs to configure text features of lyrics to be generated, the system generates a first draft text conforming to the text features for the user by utilizing an overall recommendation model, wherein the text features comprise content control features and format control features, the content control features comprise at least text styles, text moods and text labels, the format control features comprise at least text finals and paragraph attributes, the text labels can be understood as keywords (e.g. love), and the paragraph attributes can comprise major and minor song attributes, the number of lines or numbers of the paragraphs, the finals or tones of the paragraphs and the like. In the specific implementation, if the target authoring auxiliary model is an integral recommendation model, text features are input into the integral recommendation model, a first coding result is obtained by coding based on content control features through an encoder in the integral recommendation model, and a first coding result is decoded based on format control features through a decoder in the integral recommendation model to obtain a draft text. With continued reference to fig. 3, the input of the overall recommendation model is a text feature, where the text feature includes a style of lyrics (i.e., the text style), an expressed emotional state (i.e., the text emotion), a label (i.e., the text label) that is expected to appear in the lyrics, and further includes a format control feature such as a final of the overall lyrics (i.e., the text final) and an attribute of each segment of the lyrics (i.e., the paragraph attribute), and the output of the overall recommendation model is the overall lyrics (i.e., the first draft text) that conforms to the text feature.
In an alternative embodiment, the global recommendation model uses a seq2seq model, and the seq2seq model is composed of an encoder and a decoder, which may be implemented in the form of a Transformer neural network structure. Wherein the encoder encodes the input into an intermediate representation vector and the decoder is arranged to decode the next output character in combination with the output of the encoder and the already decoded partial sequence. In a specific implementation, the text style, text emotion, text label and other content control features in the text features are input to the encoder of the seq2seq model in the data style of style < s > emotion < s > label, and encoded in the encoder of the seq2seq model, and the text vowel, paragraph attribute and other format control features are decoded in the decoder of the seq2seq model, specifically, the first draft text can be generated word by word according to the restrictions of the text vowel and paragraph attribute (such as paragraph separator) and the like.
In addition, in order to promote the language fluency and the correlation of the front and back lyrics sentences of the overall recommendation model, the embodiment of the invention does not directly train the seq2seq model, but initializes the codec (encoder and decoder) by using the parameters of the pre-trained language model. Alternatively, the Pre-Training language model is a GPT (generating Pre-Training) model trained using a large number of unsupervised text corpora, which is an autoregressive language model, i.e., predicting future words using words that have appeared, and calculating MLP (Multi-Layer Perceptron) loss optimization model parameters for the probabilities of the predicted words. Because the GPT model has more parameters and the pre-training text is quite large, the embodiment of the invention trains the seq2seq model in the mode, so that the whole recommendation model obtained by training can grasp the correlation between long text lyrics more and promote the generated language fluency.
Mode (two), narrative recommendation: the narrative recommendation is for a user who has a story or thought to express, but lacks the skill of creating lyrics, and the user only needs to input a plot description text (also called story text) of a desired lyric description, and the narrative recommendation model generates a lyric for the user according to the plot description text, so as to obtain the lyrics embedded with the story text. In a specific implementation, if the target authoring auxiliary model is a narrative recommendation model, inputting the plot description text into the narrative recommendation model, encoding the plot description text by an encoder in the narrative recommendation model to obtain a second encoding result, and decoding the second encoding result by a decoder in the narrative recommendation model to obtain a first draft text. With continued reference to fig. 3, the narrative recommendation model is input as story text and output as whole lyrics generated from the expansion of the story text.
In an alternative embodiment, the narrative recommendation model employs a seq2seq model. Specifically, the encoder of the seq2seq model encodes the story text to obtain a second encoding result, and inputs the second encoding result to the decoder of the seq2seq model, which decodes the second encoding result character by character, thereby obtaining the whole lyrics. In practical application, the training process of the narrative recommendation model may refer to the foregoing training process of the overall recommendation model, and the embodiments of the present invention are not described herein.
Mode (III), real-time recommendation: real-time recommendation can be used for recommending the next line of lyrics to a user with a certain creation basis when the user writes the lyrics line by line. According to the embodiment of the invention, through a real-time recommendation model, according to the text of the above single sentence written by the user, subsequent one or more text-to-text single sentences are generated. If the user is satisfied with the text of the text single sentence recommended by the real-time recommendation model, the user can directly adopt the text of the text single sentence, and if the user is not satisfied with the text of the text single sentence recommended by the real-time recommendation model, the heuristic can be obtained from the text of the text single sentence, so that the lyrics can be written continuously. In specific implementation, if the target authoring auxiliary model is a real-time recommendation model, inputting the above single sentence text into the real-time recommendation model, generating one or more lower single sentence texts based on the above single sentence text through the real-time recommendation model, and taking the combination of the above single sentence text and each lower Wen Shangou text as a draft text. With continued reference to fig. 3, the real-time recommendation model is input as the text of the above sentence and output as the text of the next Wen Shangou.
In an alternative embodiment, the real-time recommendation model employs an autoregressive language model. In practical application, the fine tuning of the pre-trained autoregressive language model in the lyrics can be based on the pre-trained autoregressive language model, the text of the above sentence is used as the prefix of the fine-tuned autoregressive language model, and then the text of the following sentence is generated character by character. In one embodiment, multiple text in a single sentence may be returned to the user for selection by the user in a sampled manner.
In the authoring phase, a user authored lyrics typically has three authoring dilemmas: (1) The user does not have a follow-up pen for writing lyrics, and does not have specific contents to be written; (2) The user wishes to describe a story, but it is difficult to compose the story into lyrics; (3) The user has a certain creation basis, but can encounter the condition of katana thinking in the process of creating lyrics. Aiming at the creation dilemma, the embodiment of the invention provides the three auxiliary functions, specifically the whole recommendation, the narrative recommendation and the real-time recommendation. The overall recommendation generates an overall lyric for a user according to text characteristics input by the user, and the narrative recommendation generates a lyric for the user by expansion according to story text input by the user; real-time recommendation Wen Shangou text is recommended in real-time according to the text of the single sentence written by the user. The embodiment of the invention can better assist the user in solving the dilemma of various types of creation in the creation stage, so that the creator of the lyrics creation not only comprises professional creators but also comprises common users.
For the modification stage, the modified auxiliary model set provided by the embodiment of the invention comprises one or more of a paragraph recommendation model, a single sentence text recommendation model and a vocabulary recommendation model.
For ease of understanding, referring to an auxiliary function diagram of a modification stage shown in fig. 4, based on this, embodiments of the present invention provide some implementations of generating modified text according to text to be modified and modification parameters by a target modification auxiliary model, see the following modes (a) to (c):
mode (a), paragraph recommends: the application scenario of paragraph recommendation is that the user is dissatisfied with the content or format of a certain lyric, and can recommend a new candidate paragraph set (i.e. the modified text) by using a paragraph recommendation model according to the paragraph context and modification parameters set by the user, and the user can select a needed paragraph to replace the new candidate paragraph set. Specifically, if the target modification auxiliary model is a paragraph recommendation model, the text to be modified includes paragraph up and down text, at this time, the paragraph up and down text and the modification parameters may be input into the paragraph recommendation model, and the paragraph up and down text is modified according to the modification parameters by the paragraph recommendation model, so as to obtain one or more modified texts. The modification parameters comprise a first keyword, a paragraph line number, a paragraph word number, a paragraph final, and a paragraph tone. With continued reference to fig. 4, the input of the paragraph recommendation model is the contextual lyrics, and the first keyword, the paragraph number, the paragraph finals, the paragraph tones, and other modification parameters, and the output of the paragraph recommendation model is the new candidate paragraph set.
In an alternative embodiment, the paragraph recommendation model employs a seq2seq model. In practical application, the data samples of the input data of the paragraph recommendation model are: the "context < s > keyword", wherein "< s >" is a separator, the input data is input to the encoder of the seq2seq model for encoding, and the "line number, word number, vowel, tone" format constraint is implemented at the decoder, the sampling generates a new candidate paragraph set for selection by the user, the constraint acts to limit the probability of the decoder generating the corresponding character, for example, the intra-sentence separator and the paragraph ending character can be generated at the corresponding positions according to the line number and word number, and the last character of each single sentence text is generated according to the vowel and tone limitation. For example, a paragraph vowel uploaded by a user is "talk front", and a tail tone is "four-tone" and contains a paragraph of "love" keywords. Examples of the output of the paragraph recommendation model are: "if there is no your romance; perhaps me is not entitled to review; as love has become cool long ago; why some regrets remain.
Mode (b), sentence text recommendation: the application scene of the single sentence text recommendation is that the user is dissatisfied with a certain sentence of lyrics, at this time, a new single sentence text set can be recommended for the user according to the context of the single sentence text to be modified and modification parameters set by the user, and the user can select the required single sentence text to replace. Specifically, if the target modification auxiliary model is a single sentence text recommendation model, the to-be-modified text includes the to-be-modified single sentence text, at this time, the to-be-modified single sentence text, the modification parameters, the first upper single sentence text and the first lower single sentence text corresponding to the to-be-modified single sentence text may be input to the single sentence text recommendation model, and the to-be-modified single sentence text is modified according to the first upper single sentence text, the first lower single sentence text and the modification parameters through the single sentence text recommendation model, so as to obtain one or more modified texts. The first text and the second text may be collectively referred to as contextual lyrics, and the modification parameters include a second keyword, a number of words, a simple vowel, a simple tone. With continued reference to fig. 4, the input of the sentence recommendation model is the modification parameters such as the contextual lyrics, the second keywords, the number of single sentence words, the single sentence finals, the single sentence tones, and the like, and the output of the sentence recommendation model is the new single sentence text set. For example, the single sentence vowel is "seven strokes", the tail word tone is "three voices", the second keyword is "campus", and the output examples of the single sentence text recommendation model are: "whenever me sits alone on a campus seat".
In an alternative embodiment, the single sentence text recommendation model employs a seq2seq model. Optionally, the training process of the sentence recommendation model may refer to the training process of the paragraph recommendation model, where the difference between the two is that the input and the output are different, and the specific training process is not described in detail in the embodiment of the present invention.
Mode (c), vocabulary recommendation: the application scene of vocabulary recommendation is that the user is not satisfied with a certain vocabulary or phrase, and can recommend additional fillable vocabulary, or recommend fillable ideogram words, or recommend related words such as near meaning words/anti-meaning words. Specifically, if the modification auxiliary model is a vocabulary recommendation model, the text to be modified includes a vocabulary to be modified, at this time, the vocabulary to be modified, the modification parameter, the second upper text and the second lower text Wen Shangou corresponding to the text of the sentence where the vocabulary to be modified is located may be input into the vocabulary recommendation model, and one or more modified texts may be output through the vocabulary recommendation model according to the vocabulary to be modified, the modification parameter, the second upper text and the second lower text Wen Shangou. The single sentence text, the second upper single sentence text and the second lower single sentence text can be collectively called as the contextual lyrics, the modification parameters comprise word vowels and word tones, the modified text comprises one or more of a first type word, a second type word and a third type word, the first type word is a replacement word meeting the modification parameters, the second type word is an intention word meeting the modification parameters, and the third type word is a near meaning word and/or an inverse meaning word corresponding to the word to be modified. With continued reference to fig. 4, the input of the vocabulary recommendation model is the contextual lyrics, and the modification parameters such as the vocabulary vowels, the vocabulary tones, etc., the output of the vocabulary recommendation model is a new candidate vocabulary set, and the user can select the required vocabulary from the new candidate vocabulary set for replacement.
In the modification phase, there are typically three modification requirements for a user to modify lyrics: (1) dissatisfaction of the user with a piece of lyrics; (2) dissatisfaction of the user with a sentence of lyrics; (3) user dissatisfaction with a certain vocabulary. Aiming at the modification requirements, the embodiment of the invention provides the three auxiliary functions, in particular the paragraph recommendation, the single sentence text recommendation, the vocabulary recommendation and the like, wherein the paragraph recommendation, the single sentence text recommendation and the vocabulary recommendation can respectively recommend a candidate paragraph set, a candidate single sentence text set and a candidate vocabulary set for a user according to modification parameters such as vowels, tones and keywords, and the user can select and fill the initial text. The auxiliary function of the modification stage provided by the embodiment of the invention can help a user to moisten and push the manuscript text, and help the user to provide suggestions and inspiration when modifying the manuscript text.
In addition, the user may also experience the following problems throughout the text authoring process: (1) how to meet the rhyme requirement; (2) How to learn the specific application of a certain text segment in the historical text corpus. Therefore, the intelligent lyric assisting creation system provided by the embodiment of the invention is also provided with a rhyme assisting tool (also called as rhyme assisting function) and a inspiration searching assisting function (also called as inspiration searching assisting function). See the schematic diagram of an auxiliary tool shown in fig. 5. The rhyme auxiliary tool inputs rhyme limiting rules such as selected words, vowels, tones and the like, and outputs the rhyme limiting rules as an rhyme vocabulary set; the input of the inspiration search auxiliary function is words to be searched or texts to be searched of single sentence texts to be searched, the input is a first selectable single sentence text set or a second selectable single sentence text set, the selectable single sentence texts in the first selectable single sentence text set contain the words to be searched, and the similarity between the selectable single sentence texts in the second selectable single sentence text set and the texts to be searched is higher than a preset similarity threshold value.
In order to make lyrics smoother, rhymes between sentences are usually considered in the lyrics creation process, but users consider single-press and double-press to possibly need to consult related data, so that extra time is spent. Therefore, the embodiment of the invention can provide the rhyme vocabulary set for the user through the rhyme auxiliary tool so as to facilitate the user to select the required target rhyme vocabulary from the target rhyme vocabulary set. In one embodiment, first, a selected word and a rhyme limiting rule uploaded by a user are acquired, then a plurality of rhyme words are output according to the selected word and the rhyme limiting rule through a pre-configured rhyme auxiliary function, then the heat value of each rhyme word is calculated based on the rhyme times of each rhyme word, each rhyme word is ordered according to the heat value of each rhyme word, and accordingly the target rhyme word corresponding to the selected word is determined from each rhyme word according to an ordering result. At this time, the user only needs to input the selected word to be rhymed, and the rhyme auxiliary tool can search the rhyme vocabulary set conforming to the rhyme limiting rule (such as the same as the selected word vowel) for the user, so that a lot of creation time is saved. For example, if the double-pressing word "love" is searched, the number of times of the ending rhyme with "love" in all lyrics corpus is counted, the number of times of the rhyme represents the heat value, and at this time, the rhyme vocabulary can be ordered according to the order of the heat value from high to low for the user to select.
For assisting a user to quickly search a method for using a specified text in an existing corpus or similar text, for example, the user specifies a word to be searched and expects to acquire the context of the word to be searched used in a historical lyric corpus; or the user designates a single sentence text to be searched, and expects to acquire the single sentence text similar to the single sentence text to be searched, thereby acquiring the creative inspiration. In one embodiment, the text to be retrieved uploaded by the user is first obtained. If the text to be searched comprises the vocabulary to be searched, searching a plurality of first selectable single sentence texts through a preconfigured inspiration search auxiliary function so as to facilitate the user to know how the creator of the vocabulary to be searched uses the vocabulary to be searched; and if the text to be searched comprises the single sentence text to be searched, searching a plurality of second selectable single sentence texts through the inspiration search auxiliary function so as to excite the creation inspiration of the user.
Through the rhyme auxiliary function and the inspiration search auxiliary function, the difficulty of lyric creation can be effectively reduced, the efficiency of lyric creation can be improved, and a user can put more time and energy on creative expression of thinking of lyrics.
In summary, the embodiment of the present invention has at least the following features:
(1) In the process of human authoring lyrics, the auxiliary function of AI is fully exerted, and the AI and human are better co-authored. In addition, the method can better combine the respective authoring advantages of human beings and AI, so that excellent works can be authored more easily, the efficiency of lyric authoring is improved, and a common user can author high-quality works.
(2) The auxiliary function of the creation stage can help the user solve the dilemma of various creation, effectively reduces the threshold of lyric creation, and can generate diversified lyrics.
(3) The auxiliary function of the modification stage can help the user to moisten and push the work, and provide suggestions and inspiration for the user to modify.
(4) The inspiration search auxiliary function can search the existing high-quality related corpus for the user so as to make up for the problem of limited memory of the user, and help and inspire the user to modify. The rhyming auxiliary function can be not limited to the knowledge base of the user when the user considers the rhyming words, or can read the dictionary and the like, so that various words meeting the conditions are provided for the user.
For the text creation assistance method provided in the foregoing embodiment, the embodiment of the present invention provides a text creation assistance device, referring to a schematic structural diagram of a text creation assistance device shown in fig. 6, the device mainly includes the following parts:
A first model determination module 602 is configured to determine a target authoring assistance model from a set of pre-trained authoring assistance models.
The manuscript generation module 604 is configured to obtain text attribute parameters, and generate a manuscript text based on the text attribute parameters through the target authoring auxiliary model.
A second model determination module 606 for determining a target modified auxiliary model from the set of modified auxiliary models obtained by pre-training.
The manuscript modification module 608 is configured to determine a text to be modified and modification parameters corresponding to the text to be modified based on the manuscript text, and generate a modified text according to the text to be modified and the modification parameters through the target modification auxiliary model.
The text determination module 610 is configured to determine a target text according to the first draft text and the modified text.
The auxiliary device for text creation provided by the embodiment of the invention realizes collaborative creation of a user and an AI (Artificial Intelligence ) by utilizing the creation auxiliary model set and the modification auxiliary model set, generates a corresponding first draft text based on text attribute parameters by the target creation auxiliary model, modifies the text to be modified in the first draft text based on modification parameters by the target modification auxiliary model, thereby obtaining a target text required by the user.
In one embodiment, the set of authoring assistance models includes one or more of an overall recommendation model, a narrative recommendation model, a real-time recommendation model; the types of the text attribute parameters include one or more of text features, scenario description text, upper Wen Shangou text; the types of text attribute parameters corresponding to different authoring auxiliary models are different.
In one embodiment, the type of the text attribute parameter corresponding to the overall recommendation model is a text feature, and the text feature comprises a content control feature and a format control feature; the manuscript generation module 604 is further configured to: if the target creation auxiliary model is an integral recommendation model, inputting text features into the integral recommendation model, encoding based on content control features by an encoder in the integral recommendation model to obtain a first encoding result, and decoding the first encoding result based on format control features by a decoder in the integral recommendation model to obtain a manuscript text; wherein, the overall recommendation model adopts a seq2seq model; the content control features at least comprise text style, text emotion and text labels; the format control feature includes at least text vowels and paragraph attributes.
In one embodiment, the type of text attribute parameter corresponding to the narrative recommendation model is a scenario description text; the manuscript generation module 604 is further configured to: if the target creation auxiliary model is a narrative recommendation model, inputting a plot description text into the narrative recommendation model, encoding the plot description text through an encoder in the narrative recommendation model to obtain a second encoding result, and decoding the second encoding result through a decoder in the narrative recommendation model to obtain a first draft text; wherein the narrative recommendation model employs a seq2seq model.
In one embodiment, the type of the text attribute parameter corresponding to the real-time recommendation model is the text of the single sentence above; the manuscript generation module 604 is further configured to: if the target creation auxiliary model is a real-time recommendation model, inputting the above single sentence text into the real-time recommendation model, generating one or more lower single sentence texts based on the above single sentence text through the real-time recommendation model, and taking the combination of the above single sentence text and each lower Wen Shangou text as a manuscript text; wherein, the real-time recommendation model adopts an autoregressive language model.
In one embodiment, the modified auxiliary model set includes one or more of a paragraph recommendation model, a single sentence text recommendation model, and a vocabulary recommendation model.
In one embodiment, if the target modification auxiliary model is a paragraph recommendation model, the text to be modified includes paragraph up and down text; the draft modification module 608 is also configured to: inputting the paragraph up-down text and the modification parameters into a paragraph recommendation model, and modifying the paragraph up-down text according to the modification parameters through the paragraph recommendation model to obtain one or more modified texts; the modification parameters comprise a first keyword, paragraph line numbers, paragraph word numbers, paragraph vowels and paragraph tones; wherein, the paragraph recommendation model adopts a seq2seq model.
In one embodiment, if the target modification auxiliary model is a sentence text recommendation model, the text to be modified includes the sentence text to be modified; the draft modification module 608 is also configured to: inputting the single sentence text to be modified, the modification parameters, the first upper single sentence text and the first lower single sentence text corresponding to the single sentence text to be modified into a single sentence text recommendation model, and modifying the single sentence text to be modified according to the first upper single sentence text, the first lower single sentence text and the modification parameters through the single sentence text recommendation model to obtain one or more modified texts; the modification parameters comprise a second keyword, the number of single sentence words, the single sentence vowel footage and the single sentence intonation; wherein, the single sentence text recommendation model adopts a seq2seq model.
In one embodiment, if the modification auxiliary model is a vocabulary recommendation model, the text to be modified includes the vocabulary to be modified; the draft modification module 608 is also configured to: inputting the vocabulary to be modified, the modification parameters, the second upper single sentence text and the second lower Wen Shangou text corresponding to the single sentence text of the vocabulary to be modified into a vocabulary recommendation model, and outputting one or more modified texts according to the vocabulary to be modified, the modification parameters, the second upper single sentence text and the second lower Wen Shangou text through the vocabulary recommendation model; the modification parameters comprise vocabulary vowels and vocabulary tones; the modified text comprises one or more of a first vocabulary, a second vocabulary and a third vocabulary, wherein the first vocabulary is a replacement vocabulary meeting modification parameters, the second vocabulary is an intention vocabulary meeting modification parameters, and the third vocabulary is a near meaning vocabulary and/or an inverse meaning vocabulary corresponding to the vocabulary to be modified.
In one embodiment, the above device further includes a rhyme assisting module, configured to: acquiring selected words and rhyme limiting rules uploaded by a user; outputting a plurality of rhyming words according to the selected words and the rhyming limiting rules through a pre-configured rhyming auxiliary function; calculating the heat value of each rhyme vocabulary based on the rhyme times of each rhyme vocabulary, and sequencing each rhyme vocabulary according to the heat value of each rhyme vocabulary; and determining the target rhyme vocabulary corresponding to the selected word from the rhyme vocabularies according to the sorting result.
In one embodiment, the apparatus further comprises a inspiration assisting module for: acquiring a text to be retrieved uploaded by a user; the text to be searched comprises words to be searched or single sentence text to be searched; if the text to be searched comprises the vocabulary to be searched, searching a plurality of first selectable single sentence texts through a preconfigured inspiration search auxiliary function; the first selectable single sentence text comprises words to be searched; if the text to be searched comprises the single sentence text to be searched, searching a plurality of second selectable single sentence texts through a inspiration search auxiliary function; and the similarity between the second selectable sentence text and the sentence text to be searched is higher than a preset similarity threshold value.
In one embodiment, the target text includes at least lyric text.
The device provided by the embodiment of the present invention has the same implementation principle and technical effects as those of the foregoing method embodiment, and for the sake of brevity, reference may be made to the corresponding content in the foregoing method embodiment where the device embodiment is not mentioned.
The embodiment of the invention provides a server, which specifically comprises a processor and a storage device; the storage means has stored thereon a computer program which, when executed by the processor, performs the method of any of the embodiments described above.
Fig. 7 is a schematic structural diagram of a server according to an embodiment of the present invention, where the server 100 includes: a processor 70, a memory 71, a bus 72 and a communication interface 73, said processor 70, communication interface 73 and memory 71 being connected by bus 72; the processor 70 is arranged to execute executable modules, such as computer programs, stored in the memory 71.
The memory 71 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one magnetic disk memory. The communication connection between the system network element and the at least one other network element is achieved via at least one communication interface 73 (which may be wired or wireless), which may use the internet, a wide area network, a local network, a metropolitan area network, etc.
Bus 72 may be an ISA bus, a PCI bus, an EISA bus, or the like. The buses may be classified as address buses, data buses, control buses, etc. For ease of illustration, only one bi-directional arrow is shown in FIG. 7, but not only one bus or type of bus.
The memory 71 is configured to store a program, and the processor 70 executes the program after receiving an execution instruction, where the method executed by the apparatus for flow defining disclosed in any of the foregoing embodiments of the present invention may be applied to the processor 70 or implemented by the processor 70.
The processor 70 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 70. The processor 70 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a digital signal processor (Digital Signal Processing, DSP for short), application specific integrated circuit (Application Specific Integrated Circuit, ASIC for short), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA for short), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The disclosed methods, steps, and logic blocks in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory 71 and the processor 70 reads the information in the memory 71 and in combination with its hardware performs the steps of the method described above.
The computer program product of the readable storage medium provided by the embodiment of the present invention includes a computer readable storage medium storing a program code, where the program code includes instructions for executing the method described in the foregoing method embodiment, and the specific implementation may refer to the foregoing method embodiment and will not be described herein.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention, and are not intended to limit the scope of the present invention, but it should be understood by those skilled in the art that the present invention is not limited thereto, and that the present invention is described in detail with reference to the foregoing examples: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (13)

1. A method for assisting in text authoring, the method comprising:
determining a target authoring auxiliary model from an authoring auxiliary model set obtained through pre-training; the authoring auxiliary model set comprises one or more of an overall recommendation model, a narrative recommendation model and a real-time recommendation model; the types of the text attribute parameters include one or more of text features, scenario description text, upper Wen Shangou text; the types of text attribute parameters corresponding to different authoring auxiliary models are different;
Acquiring text attribute parameters, and generating a manuscript text based on the text attribute parameters through the target authoring auxiliary model;
determining a target modification auxiliary model from a modification auxiliary model set obtained through pre-training;
determining a text to be modified and modification parameters corresponding to the text to be modified based on the initial draft text, and generating a modified text according to the text to be modified and the modification parameters through the target modification auxiliary model;
determining a target text according to the manuscript text and the modified text;
the type of the text attribute parameter corresponding to the integral recommendation model is a text feature, and the text feature comprises a content control feature and a format control feature;
the step of generating the manuscript text based on the text attribute parameters through the target authoring assistance model comprises the following steps:
if the target creation auxiliary model is the integral recommendation model, inputting the text features into the integral recommendation model, encoding based on the content control features by an encoder in the integral recommendation model to obtain a first encoding result, and decoding the first encoding result based on the format control features by a decoder in the integral recommendation model to obtain a manuscript text;
Wherein, the overall recommendation model adopts a seq2seq model; the content control features at least comprise text styles, text moods and text labels; the format control feature includes at least text vowels and paragraph attributes.
2. The method of claim 1 wherein the type of text attribute parameter corresponding to the narrative recommendation model is a scenario description text;
the step of generating the manuscript text based on the text attribute parameters through the target authoring assistance model comprises the following steps:
if the target creation auxiliary model is the narrative recommendation model, inputting the scenario description text into the narrative recommendation model, encoding the scenario description text through an encoder in the narrative recommendation model to obtain a second encoding result, and decoding the second encoding result through a decoder in the narrative recommendation model to obtain a manuscript text;
wherein the narrative recommendation model employs a seq2seq model.
3. The method of claim 1, wherein the type of text attribute parameter corresponding to the real-time recommendation model is the above single sentence text;
the step of generating the manuscript text based on the text attribute parameters through the target authoring assistance model comprises the following steps:
If the target authoring auxiliary model is the real-time recommendation model, inputting the upper Wen Shangou text into the real-time recommendation model, generating one or more lower sentence texts based on the upper Wen Shangou text through the real-time recommendation model, and taking the combination of the upper Wen Shangou text and each lower Wen Shangou text as a manuscript text;
wherein, the real-time recommendation model adopts an autoregressive language model.
4. The method of claim 1, wherein the set of modified auxiliary models includes one or more of a paragraph recommendation model, a single sentence text recommendation model, a vocabulary recommendation model.
5. The method of claim 4, wherein if the target modification auxiliary model is the paragraph recommendation model, the text to be modified comprises paragraph up and down text;
the step of generating the modified text according to the text to be modified and the modification parameters through the target modification auxiliary model comprises the following steps:
inputting the paragraph up-down text and the modification parameters into the paragraph recommendation model, and modifying the paragraph up-down text according to the modification parameters through the paragraph recommendation model to obtain one or more modified texts; the modification parameters comprise a first keyword, paragraph line numbers, paragraph word numbers, paragraph vowels and paragraph tones;
Wherein, the paragraph recommendation model adopts a seq2seq model.
6. The method of claim 4, wherein if the target modification auxiliary model is the sentence text recommendation model, the text to be modified comprises a sentence text to be modified;
the step of generating the modified text according to the text to be modified and the modification parameters through the target modification auxiliary model comprises the following steps:
inputting the single sentence text to be modified, the modification parameters, a first upper single sentence text and a first lower single sentence text corresponding to the single sentence text to be modified into the single sentence text recommendation model, and modifying the single sentence text to be modified according to the first upper single sentence text, the first lower single sentence text and the modification parameters through the single sentence text recommendation model to obtain one or more modified texts; the modification parameters comprise a second keyword, the number of words of a single sentence, the vowel footage of the single sentence and the tone of the single sentence;
the single sentence text recommendation model adopts a seq2seq model.
7. The method of claim 4, wherein if the modification auxiliary model is the vocabulary recommendation model, the text to be modified comprises a vocabulary to be modified;
The step of generating the modified text according to the text to be modified and the modification parameters through the target modification auxiliary model comprises the following steps:
inputting the vocabulary to be modified, the modification parameters, a second upper single sentence text and a second lower Wen Shangou text corresponding to the single sentence text of the vocabulary to be modified into the vocabulary recommendation model, and outputting one or more modified texts according to the vocabulary to be modified, the modification parameters, the second upper single sentence text and the second lower Wen Shangou text through the vocabulary recommendation model; the modification parameters comprise vocabulary vowels and vocabulary tones;
the modified text comprises one or more of a first vocabulary, a second vocabulary and a third vocabulary, wherein the first vocabulary is a replacement vocabulary meeting the modification parameters, the second vocabulary is an intention vocabulary meeting the modification parameters, and the third vocabulary is a hyponym vocabulary and/or an anticnym vocabulary corresponding to the vocabulary to be modified.
8. The method according to claim 1, wherein the method further comprises:
acquiring selected words and rhyme limiting rules uploaded by a user;
Outputting a plurality of rhyme vocabularies according to the selected words and the rhyme limiting rules through a pre-configured rhyme auxiliary function;
calculating the heat value of each rhyme vocabulary based on the rhyme times of each rhyme vocabulary, and sequencing each rhyme vocabulary according to the heat value of each rhyme vocabulary;
and determining the target rhyme vocabulary corresponding to the selected word from the rhyme vocabularies according to the ordering result.
9. The method according to claim 1, wherein the method further comprises:
acquiring a text to be retrieved uploaded by a user; the text to be searched comprises words to be searched or single sentence text to be searched;
if the text to be searched comprises the vocabulary to be searched, searching a plurality of first selectable single sentence texts through a preconfigured inspiration search auxiliary function; wherein the first selectable single sentence text contains the vocabulary to be searched;
if the text to be searched comprises the single sentence text to be searched, searching a plurality of second selectable single sentence texts through the inspiration search auxiliary function; and the similarity between the second selectable single sentence text and the single sentence text to be searched is higher than a preset similarity threshold value.
10. The method of claim 1, wherein the target text comprises at least lyric text.
11. An auxiliary device for text authoring, the device comprising:
the first model determining module is used for determining a target authoring auxiliary model from the authoring auxiliary model set obtained through pre-training; the authoring auxiliary model set comprises one or more of an overall recommendation model, a narrative recommendation model and a real-time recommendation model; the types of the text attribute parameters include one or more of text features, scenario description text, upper Wen Shangou text; the types of text attribute parameters corresponding to different authoring auxiliary models are different;
the manuscript generation module is used for acquiring text attribute parameters and generating manuscript texts based on the text attribute parameters through the target creation auxiliary model;
the second model determining module is used for determining a target modification auxiliary model from a modification auxiliary model set obtained through pre-training;
the manuscript modification module is used for determining a text to be modified and modification parameters corresponding to the text to be modified based on the manuscript text, and generating a modified text according to the text to be modified and the modification parameters through the target modification auxiliary model;
A text determining module for determining a target text according to the manuscript text and the modified text;
the type of the text attribute parameter corresponding to the integral recommendation model is a text feature, and the text feature comprises a content control feature and a format control feature;
the manuscript generation module is further configured to:
if the target creation auxiliary model is the integral recommendation model, inputting the text features into the integral recommendation model, encoding based on the content control features by an encoder in the integral recommendation model to obtain a first encoding result, and decoding the first encoding result based on the format control features by a decoder in the integral recommendation model to obtain a manuscript text;
wherein, the overall recommendation model adopts a seq2seq model; the content control features at least comprise text styles, text moods and text labels; the format control feature includes at least text vowels and paragraph attributes.
12. A server comprising a processor and a memory;
stored on the memory is a computer program which, when executed by the processor, performs the method of any one of claims 1 to 10.
13. A computer storage medium storing computer software instructions for use with the method of any one of claims 1 to 10.
CN202110324256.8A 2021-03-25 2021-03-25 Text creation assisting method, device and server Active CN113033182B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110324256.8A CN113033182B (en) 2021-03-25 2021-03-25 Text creation assisting method, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110324256.8A CN113033182B (en) 2021-03-25 2021-03-25 Text creation assisting method, device and server

Publications (2)

Publication Number Publication Date
CN113033182A CN113033182A (en) 2021-06-25
CN113033182B true CN113033182B (en) 2024-03-01

Family

ID=76474414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110324256.8A Active CN113033182B (en) 2021-03-25 2021-03-25 Text creation assisting method, device and server

Country Status (1)

Country Link
CN (1) CN113033182B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113987209B (en) * 2021-11-04 2024-05-24 浙江大学 Natural language processing method, device, computing equipment and storage medium based on knowledge-guided prefix fine adjustment
CN114997164A (en) * 2022-05-31 2022-09-02 北京深言科技有限责任公司 Text generation method and device
CN116561350B (en) * 2023-07-07 2024-01-09 腾讯科技(深圳)有限公司 Resource generation method and related device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996030844A1 (en) * 1995-03-28 1996-10-03 Takashi Ogata Support system for automation of story structure preparation
CN106407168A (en) * 2016-09-06 2017-02-15 首都师范大学 Automatic generation method for practical writing
CN110705222A (en) * 2019-10-05 2020-01-17 吕元喜 Intelligent creation system based on mobile terminal or PC terminal
CN111753508A (en) * 2020-06-29 2020-10-09 网易(杭州)网络有限公司 Method and device for generating content of written works and electronic equipment
CN111832275A (en) * 2020-09-21 2020-10-27 北京百度网讯科技有限公司 Text creation method, device, equipment and storage medium
US10936805B2 (en) * 2017-03-15 2021-03-02 International Business Machines Corporation Automated document authoring assistant through cognitive computing

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200005117A1 (en) * 2018-06-28 2020-01-02 Microsoft Technology Licensing, Llc Artificial intelligence assisted content authoring for automated agents
US11520971B2 (en) * 2019-03-30 2022-12-06 The Regents Of The University Of California System and method for artificial intelligence story generation allowing content introduction

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1996030844A1 (en) * 1995-03-28 1996-10-03 Takashi Ogata Support system for automation of story structure preparation
CN106407168A (en) * 2016-09-06 2017-02-15 首都师范大学 Automatic generation method for practical writing
US10936805B2 (en) * 2017-03-15 2021-03-02 International Business Machines Corporation Automated document authoring assistant through cognitive computing
CN110705222A (en) * 2019-10-05 2020-01-17 吕元喜 Intelligent creation system based on mobile terminal or PC terminal
CN111753508A (en) * 2020-06-29 2020-10-09 网易(杭州)网络有限公司 Method and device for generating content of written works and electronic equipment
CN111832275A (en) * 2020-09-21 2020-10-27 北京百度网讯科技有限公司 Text creation method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN113033182A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
KR102577514B1 (en) Method, apparatus for text generation, device and storage medium
CN113033182B (en) Text creation assisting method, device and server
CN108711420B (en) Multilingual hybrid model establishing method, multilingual hybrid model establishing device, multilingual hybrid model data obtaining device and electronic equipment
Smit et al. Morfessor 2.0: Toolkit for statistical morphological segmentation
Honnibal et al. Joint incremental disfluency detection and dependency parsing
Mairesse et al. Stochastic language generation in dialogue using factored language models
CN110782870A (en) Speech synthesis method, speech synthesis device, electronic equipment and storage medium
CN111783455B (en) Training method and device of text generation model, and text generation method and device
CN108052499B (en) Text error correction method and device based on artificial intelligence and computer readable medium
CN108153864A (en) Method based on neural network generation text snippet
CN111341293B (en) Text voice front-end conversion method, device, equipment and storage medium
US11562144B2 (en) Generative text summarization system and method
Zheng et al. BLSTM-CRF Based End-to-End Prosodic Boundary Prediction with Context Sensitive Embeddings in a Text-to-Speech Front-End.
CN112818698B (en) Fine-grained user comment sentiment analysis method based on dual-channel model
CN110782880A (en) Training method and device of rhythm generation model
CN112216267A (en) Rhythm prediction method, device, equipment and storage medium
CN114298031A (en) Text processing method, computer device and storage medium
WO2003079224A1 (en) Text generation method and text generation device
CN112883729B (en) Word recommendation method and device for text creation and server
CN113012685B (en) Audio recognition method and device, electronic equipment and storage medium
CN114358021A (en) Task type dialogue statement reply generation method based on deep learning and storage medium
CN111090720B (en) Hot word adding method and device
Seifossadat et al. Stochastic Data-to-Text Generation Using Syntactic Dependency Information
Takeishi et al. Wakavt: A sequential variational transformer for waka generation
CN113268952B (en) Text generation method and device and electronic equipment

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