WO2021139344A1 - 基于人工智能的文本生成方法、装置、计算机设备和介质 - Google Patents

基于人工智能的文本生成方法、装置、计算机设备和介质 Download PDF

Info

Publication number
WO2021139344A1
WO2021139344A1 PCT/CN2020/124736 CN2020124736W WO2021139344A1 WO 2021139344 A1 WO2021139344 A1 WO 2021139344A1 CN 2020124736 W CN2020124736 W CN 2020124736W WO 2021139344 A1 WO2021139344 A1 WO 2021139344A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
word
structure information
information
content
Prior art date
Application number
PCT/CN2020/124736
Other languages
English (en)
French (fr)
Inventor
邓黎明
庄伯金
王少军
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021139344A1 publication Critical patent/WO2021139344A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/253Grammatical analysis; Style critique
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/049Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • 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

Definitions

  • This application relates to the field of artificial intelligence, and in particular to a text generation method, device, computer equipment and medium based on artificial intelligence.
  • Text generation is widely used in various natural language processing tasks today, such as speech recognition, machine translation, document classification, and human-machine dialogue.
  • a neural network is used to learn the statistical associations between words or words, and then make predictions based on the learning results to obtain the prediction results.
  • the inventor realizes that in this manner, the randomness of the generation of the text content is relatively large, so that the accuracy of the generated text content is low.
  • the main purpose of this application is to provide an artificial intelligence-based text generation method, device, computer equipment and medium that can improve the accuracy of text content generation, aiming to solve the problem of low accuracy of generated text content.
  • An artificial intelligence-based text generation method includes:
  • new text content is generated.
  • a text generation device based on artificial intelligence comprising:
  • the text generation request obtaining module is used to obtain the text generation request, the text generation request carries text keywords and reference text content;
  • the text structure information extraction module is used to extract text structure information from the reference text content, and the text structure information is used to control the text structure of the text content to be generated;
  • the text content generation module is used to generate new text content according to the extracted text structure information and text keywords.
  • a computer device includes a memory and a processor, the memory stores a computer program, and the processor implements an artificial intelligence-based text generation method when the computer program is executed;
  • the steps of the artificial intelligence-based text generation method include:
  • the text generation request carrying text keywords and reference text content
  • new text content is generated.
  • the steps of the artificial intelligence-based text generation method include:
  • the text generation request carrying text keywords and reference text content
  • new text content is generated.
  • the above-mentioned artificial intelligence-based text generation method, device, computer equipment and medium extract text structure information from the reference text content, and generate text content corresponding to the text structure information, so that the text content generation meets the text structure requirements of the reference text content , To improve the accuracy of text generation.
  • Fig. 1 is an application scenario diagram of an artificial intelligence-based text generation method in an embodiment
  • FIG. 2 is a schematic flowchart of a text generation method based on artificial intelligence in an embodiment
  • FIG. 3 is a schematic flowchart of a text generation method based on artificial intelligence in another embodiment
  • Figure 4 is a structural block diagram of an artificial intelligence-based text generation device in an embodiment
  • Fig. 5 is an internal structure diagram of a computer device in an embodiment.
  • the artificial intelligence-based text generation method provided in this application can be applied to the application environment as shown in FIG. 1.
  • the terminal 102 communicates with the server 104 through the network. Specifically, the terminal 102 receives user input, generates a text generation request, and sends the generated text generation request to the server 104.
  • the text generation request carries text keywords and reference text content.
  • the server 104 obtains the text generation request, it extracts the text structure information from the reference text content carried in the text generation request. Then the server 104 generates new text content according to the extracted text structure information and text keywords.
  • the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • the server 104 may be implemented by an independent server or a server cluster composed of multiple servers.
  • a text generation method based on artificial intelligence is provided. Taking the method applied to the server in FIG. 1 as an example for description, the method includes the following steps:
  • Step S202 Obtain a text generation request.
  • the text generation request carries text keywords and reference text content.
  • the text generation request refers to a request sent by the terminal for generating text content, and the text generation request carries the text keywords of the text content to be generated and the reference text content.
  • Reference text content refers to text content used for reference, or can also be called a text template.
  • the user can select the corresponding reference text content through the terminal according to the desired generated text, generate a text generation request, and send it to the server.
  • the server after the server receives the text generation request, it can obtain the text keywords and the reference text content carried in the text generation request, and perform subsequent processing.
  • Step S204 Extract text structure information from the reference text content, and the text structure information is used to control the text structure of the text content to be generated.
  • the text structure information refers to the structure information of the text content, and may include grammatical structure information and word structure information.
  • the text structure information is used to control the text structure of the text content to be generated.
  • text grammatical information refers to information such as the subject-predicate-object structure of the text sentence, the main structure of the text sentence, and the modification structure.
  • the word structure information refers to the structure information of each word in the text content.
  • the server after the server obtains the text reference request, it can extract the text structure information according to the reference text content in the text reference request.
  • the text structure information can be extracted by using the deep network model of the reference text content and various grammars.
  • One or more of the tools extract text structure information to obtain text structure information of the reference text content.
  • the server can extract the text structure information corresponding to the content of the different reference text.
  • the reference text content is the text of the subject, predicate, and object structure.
  • Content such as "he is playing basketball”
  • the extracted text structure information can include subject, predicate, and object structure information.
  • the test text content is the text content of fixed subject and supplementary predicate structure, such as "the beautiful sky is always beautiful ", the extracted text structure information may include fixed subject supplemented predicate structure information.
  • Step S206 Generate new text content based on the extracted text structure information and text keywords.
  • the server may perform text word prediction based on the extracted text structure information and text keywords, and generate new text content based on the predicted text words and text keywords.
  • the new text content generated is different.
  • the new text content generated is also subject-verb Object structure
  • the new text content generated is also the fixed-subject-complement-predicate structure.
  • the text generation request carries text keywords and reference text content, and then text structure information is extracted from the reference text content, and the text structure information is used to control the content to be generated
  • the text structure of the text content further generates new text content based on the extracted text structure information and text keywords. Therefore, by extracting text structure information from the reference text content, and generating text content corresponding to the text structure information, the text content generation can meet the text structure requirements of the reference text content, and the accuracy of text generation can be improved.
  • text content corresponding to different text structures can be generated, so that the text structure of the generated text content is controllable, and the diversity of the text structure of the generated text content is improved.
  • extracting the text structure information from the reference text content may include: extracting the grammatical structure of the reference text content to obtain the grammatical structure information of the reference text content; splitting the reference text content to obtain the reference The word structure information of each text position in the text content; the grammatical structure information and word structure information are used as the text structure information of the reference text content.
  • the grammatical structure information refers to the main structure information of the text sentence, which may include the subject-predicate-object structure, the main structure of the text sentence, and the modification structure described above.
  • the word structure information refers to the position structure information of each word or word in the text sentence and the part-of-speech information of each word.
  • the server can extract the grammatical structure information of the reference text content through the neural network model.
  • the server inputs the reference text content into the ON-LSTM model to output the grammatical structure information of the reference text content.
  • the sentence level structure is obtained.
  • the server can extract the grammatical structure information of the reference text content as the subject-predicate-object structure + attributive modifier structure through the model, and determine the main structure of the text sentence as "I It’s an employee, and the modified structure is “safe”.
  • the model for extracting grammatical structure information may be a pre-trained model, and the server trains and tests the model through a large amount of training set data to obtain a trained model.
  • the server may split the reference text content through a grammar tool, such as Thulac, etc., to obtain the word structure information of the text words at each text position in the reference text content.
  • a grammar tool such as Thulac, etc.
  • splitting the reference text content to obtain the word structure information of each text position in the reference text content may include: splitting the text word of the reference text content to obtain each of the reference text content Text words, part-of-speech information of each text word, and word position information of each text word in the reference text content; split each text word to obtain text word information of each text word and each text word in the text word The position information of the characters; each part-of-speech information, word position information, text word information, and position information are used as the word structure information of each word in the reference text content.
  • the text word refers to the words that make up the text content, which can be a word composed of a single word or a word composed of multiple words.
  • the text words “I” and “ “Yes” is a word that composes the text content
  • “employees” and “peaceful” are also words that compose the text content.
  • Part of speech information refers to information indicating the part of speech of each text word, such as nouns, verbs, pronouns, adjectives, etc. For example, “I” is a pronoun, “Yes” is a verb, “employee” is a noun, and "Ping An” is an adjective .
  • Word position information refers to the position information of each text word in the text content. For example, continue to quote the previous example, "I” is the word at the first text position in the reference text content, and its position information is the first position in the text content In the same way, “Yes” and “Ping'an” are the middle position words of the reference text content. The position information is middle position word 1 and middle position word 2, and "employee” is the sentence ending word.
  • Text word information refers to the information of each text word in each text word
  • word position information refers to the position information of each text word in the text word. For example, for the text word "Ping'an”, “ping" is the middle position word 2 " ⁇ " is the second word in middle position word 2, and “ ⁇ ” is the third word in middle position word 2.
  • the server uses a grammar tool to split the reference text content into text words, and then splits the text words to obtain word structure information at each text position in the reference text content.
  • the word structure information of each text position can be determined in the following way, that is, first determine whether each word is a single-character word. If the word is a single-character word, it is represented by the letter S, and S is the abbreviation of single. If the word is a non-single-character word, each word can be represented by adding the part of speech of the word according to the position of each word in the word.
  • the generated text structure information contains not only the main structure information of the reference text content, but also the information of each word structure, so that the text structure information is The expression of the structure of each text word is more accurate, which ensures the integrity of the information.
  • generating new text content based on the extracted text structure information and text keywords may include: determining the part-of-speech information of the text keywords according to the text keywords; according to the part-of-speech information and text structure of the text keywords The word structure information of each text position in the information determines the part-of-speech information of each text word to be predicted; according to the text keywords, the part-of-speech information of the text word to be predicted, and the text structure information, the text word prediction is performed to obtain each prediction Text words; generate new text content based on each predicted text word.
  • the server may determine the part-of-speech information of the text keyword according to the text keyword carried in the text generation request, for example, for the text keyword "customer", it may be determined as a noun.
  • the server can determine the part-of-speech information of the text word to be predicted according to the word structure information of each text position in the text structure information. For example, if the text keyword "customer" is determined as a noun, then according to the word structure information, Determine that the words in the text to be predicted are pronouns, verbs, adjectives, etc. And the server can determine the number of words of each text word to be predicted, the position information in the text sentence, etc. according to the text word information and word position information in the text word information.
  • the server predicts each text word with the predicted text word according to the text keyword, the part-of-speech information of each text word to be predicted, and the obtained text structure information of the reference text content to obtain each predicted text word.
  • the server generates new text content according to the obtained predicted text words, text keywords, and text structure information. For example, if the predicted text words are “you”, “yes”, “Ping An”, the text keyword is "customer”, and the text structure information of each word, the new text content can be obtained as "you are a customer of Ping An ".
  • the text structure information is different, and the new text content obtained is different.
  • the same text words such as "you”, “yes”, “Ping An” and “customer”, if the content of the reference text is "Ping An employee is you”, a new text is generated based on the extracted text structure information The content is "Ping An's customer is you”.
  • the text keywords can also be multiple words.
  • the text keywords are "I” and "Customer”
  • the new text content generated can be "I am a Ping An customer”.
  • the generated text content is more suitable for the text generation request, and the generated text content is more accurate. For example, if the text keywords are "he”, “company”, “colleague”, the new text content generated may be "he is a colleague of the company”.
  • the word structure information of the text keyword and the word structure information of each text word to be predicted are determined according to the text keywords and the text structure information, and then the text word prediction is performed. Therefore, each text word to be predicted can be accurately predicted according to the word structure information of each text word to be predicted, and the accuracy of the prediction can be improved. Moreover, each text word is predicted by the word structure information pair of each text word to be predicted and the grammatical structure information of the reference text content, so that the text structure of the generated text content can be controlled, and the generated text content can be improved The structural diversity.
  • performing text word prediction based on text keywords, part-of-speech information of each text word to be predicted, and text structure information may include: using the text keyword as the current predicted word, and according to each word to be predicted The part-of-speech information and text structure information of the text word are predicted to obtain predicted text words; the obtained predicted text words and text keywords are used as the current predicted words, and according to the remaining text to be predicted The part-of-speech information and text structure information of the word continue to predict the text word until the prediction of all the text words to be predicted is completed.
  • the server when the server performs the prediction of text words, it first uses the text keywords as the current predicted words to perform the prediction of the text words, and then uses the obtained predicted text words and text keywords to continue. Predict the text words to be predicted that have not yet been predicted. For example, if the text keyword is "Customer”, the server may first obtain the predicted text word “Yes”, and then continue to predict based on the keyword "Customer", predicted text word "Yes” and text structure information, such as obtaining the predicted word "he”. This is repeated until the prediction of all the text words to be predicted determined by the text structure information is completed.
  • the server predicts the remaining text words to be predicted by predicting the probability of the unpredicted text words to be predicted based on the obtained probabilities of the predicted text words and keywords. For each prediction result, continue to predict the unpredicted text words to be predicted. For example, according to the keyword "customer", the probability of obtaining the "yes” of the predicted text word is 80%, and the probability of "no” is 20%, and then the subsequent prediction of the text word to be predicted is carried out, for example, further based on the "customer” "And “Yes”, the probability of getting "him” is 50%, the probability of "you” is 30%, the probability of "me” is 20%, etc. According to the "customer” and “no”, the probability of getting "him” 80%, the probability of "you” is 25%, the probability of "me” is 5%, etc. And so on, until the prediction of all the text words to be predicted is completed.
  • the server can multiply the probabilities of all predicted text words together to obtain the probability of each predicted text content, and determine the predicted text content with the highest probability Is the new text content. For example, continuing to use the previous example, the probability of predicting the text word "Yes” is 80%, and on this basis, the probability of "I” is 90%. Furthermore, the probability of "peaceful” is 50%, and the predicted text sentence can be obtained. The probability of "I am a customer of Ping An" is 36%, and the probability of "no" in the predicted text word is 70%. On this basis, the probability of "he” is 80%, and the probability of "Ping An” is 60%.
  • the probability of predicting the text sentence "he is a customer of Ping An" is 33.6%.
  • the probability of multiple predicted text content can be obtained. Then the server determines the one with the highest probability value as the new text content and outputs it.
  • the probability calculation formula for predicting text content is as shown in formula (1):
  • P(s) represents the probability value of the predicted text content
  • n represents the number of words in the predicted text content
  • P( ⁇ i / ⁇ 1 ,..., ⁇ i-1 ) represents the probability of each text word
  • the subscript indicates the position of each text word in the text content.
  • the prediction of text words is continued based on the obtained predicted text words and text keywords as the current predicted words, and the word structure information and grammatical structure information of the remaining text words to be predicted Therefore, the predicted text words that are predicted later include the prediction results of the predicted text words that have been obtained, which can improve the accuracy of the prediction, and thus the accuracy of the generated text content.
  • the server extracts text structure information from the reference text content, determines the part-of-speech information of the text keyword, the part-of-speech information of the text word to be predicted, and performs text word prediction through a prediction model.
  • the server refers to the text content and text keyword input prediction model to extract text structure information through the prediction model, that is, extract sentence level structure information (Sentence level structure) and word structure information Extract (Word level POS) and word structure information extraction (Character level POS), and then perform normalization processing (Normalization), and then convert it to a vector by Embedding, such as a 512-dimensional vector, which expresses the reference text by means of a vector
  • Embedding such as a 512-dimensional vector, which expresses the reference text by means of a vector
  • the grammatical structure information and the word structure information of the content are combined with the vector to obtain the structure information of the corresponding reference text content represented by the vector.
  • the obtained structure information is input to a multi-head self-attention mechanism (Multi-head Self-attention) layer, that is, the multi-head self-attention layer takes a 512-dimensional vector as an input to obtain a corresponding output.
  • Multi-head Self-attention there is a dependency between the output and the output.
  • the Multi-head Self-attention layer outputs a 512-dimensional vector, and normalizes the input and output (Add&Norm) to obtain the final output structure information
  • the server can convert the input text keyword into a 512-dimensional vector by performing Text&Position Embedding (Text&Position Embed), and input the masked multi-head self-attention processing mechanism with causal occlusion (Masked Multi-head Self -attention) layer, and output the corresponding results, and then normalize the input and output (Add&Norm) to obtain the final output text word information.
  • Text&Position Embed Text&Position Embed
  • Masked Multi-head Self -attention masked multi-head self-attention processing mechanism with causal occlusion
  • Add&Norm normalize the input and output
  • the server merges the obtained output structure information and output text and word information and inputs a simple fully connected (Feed Forward) layer to obtain the corresponding output, and adds the input and output of the Feed Forward layer and normalizes it. (Add&Norm) to get the corresponding text word prediction result.
  • the server performs multiple predictions according to the above process until the prediction of multiple text words is completed.
  • the model After the model completes the prediction of text words, it then generates new text content and outputs it through linear transformation (Linear) processing and logistic regression (Softmax).
  • Linear Linear processing
  • Softmax logistic regression
  • the prediction model may be a pre-trained model.
  • the server may obtain text keywords from the training set data, and input the obtained text keywords and training set data into the initial test model to extract text structure information. And the prediction training of text content.
  • the server calculates the loss value of the test model according to the training text content and the training set data, and continuously updates the test model according to the calculated loss value to obtain the trained test model, thereby improving the accuracy of the generated text content Sex.
  • the above method may further include: uploading at least one of text keywords, reference text content, text structure information, and new text content to the blockchain and storing them in the nodes of the blockchain.
  • Blockchain refers to a new application mode of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
  • Blockchain (Blockchain) is essentially a decentralized database. It is a series of data blocks associated with cryptographic methods. Each data block contains a batch of network transaction information for verification. The validity of its information (anti-counterfeiting) and the generation of the next block.
  • the blockchain may include the underlying blockchain platform, the platform product service layer, and the application service layer.
  • the server can upload and store one or more of text keywords, reference text content, text structure information, and new text content in the nodes of the blockchain to ensure the privacy and privacy of the data. safety.
  • the storage to the blockchain nodes can be guaranteed.
  • the privacy of data in China can improve data security.
  • steps in the flowchart of FIG. 2 are displayed in sequence as indicated by the arrows, these steps are not necessarily performed in sequence in the order indicated by the arrows. Unless specifically stated in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least part of the steps in FIG. 2 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution of these sub-steps or stages The sequence is not necessarily performed sequentially, but may be performed alternately or alternately with at least a part of other steps or sub-steps or stages of other steps.
  • a text generation device based on artificial intelligence including: a text generation request acquisition module 100, a text structure information extraction module 200, and a text content generation module 300, wherein:
  • the text generation request obtaining module 100 is configured to obtain a text generation request, and the text generation request carries text keywords and reference text content.
  • the text structure information extraction module 200 is used to extract text structure information from the reference text content, and the text structure information is used to control the text structure of the text content to be generated.
  • the text content generating module 300 is used to generate new text content according to the extracted text structure information and text keywords.
  • the text structure information extraction module 200 may include:
  • the grammatical structure information extraction sub-module is used to extract the grammatical structure of the reference text content to obtain the grammatical structure information of the reference text content.
  • the word structure information generating sub-module is used to split the content of the reference text to obtain the word structure information of each text position in the reference text content.
  • the text structure information generating sub-module is used to use the grammatical structure information and the word structure information as the text structure information of the reference text content.
  • the word structure information generating submodule may include:
  • the first splitting unit is used to split the text words of the reference text content to obtain each text word in the reference text content, part-of-speech information of each text word, and word position information of each text word in the reference text content.
  • the second splitting unit is used to split each text word to obtain text word information of each text word and word position information of each text word in the text word.
  • the word structure information generating unit is used to use each part of speech information, word position information, text word information, and position information as the word structure information of each word in the reference text content.
  • the text content generating module 300 may include:
  • the keyword part-of-speech information determining sub-module is used to determine the part-of-speech information of the text keywords according to the text keywords.
  • the part-of-speech information determining sub-module of the text to be predicted is used to determine the part-of-speech information of each text word to be predicted according to the part-of-speech information of the text keyword and the word structure information of each text position in the text structure information.
  • the prediction sub-module is used to perform text word prediction based on text keywords, part-of-speech information of each text word to be predicted, and text structure information, to obtain each predicted text word.
  • the text content generation sub-module is used to generate new text content according to each predicted text word.
  • the prediction sub-module may include:
  • the predictive text word generating unit is used to use the text keywords as the current predicted words, and perform the prediction of the text words according to the part-of-speech information and text structure information of the text words to be predicted to obtain the predicted text words.
  • the cyclic prediction unit is used to use the obtained predicted text words and text keywords as the current predicted words, and continue to predict the text words according to the part of speech information and text structure information of the remaining text words to be predicted, Until the prediction of all the words to be predicted is completed.
  • the above-mentioned device may further include:
  • the storage module is used to upload at least one of text keywords, reference text content, text structure information, and new text content to the blockchain and store it in the nodes of the blockchain.
  • Each module in the above-mentioned artificial intelligence-based text generation device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a server, and its internal structure diagram may be as shown in FIG. 5.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store data such as text keywords, reference text content, text structure information, and new text content.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a text generation method based on artificial intelligence.
  • FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
  • the specific computer device may Including more or fewer parts than shown in the figure, or combining some parts, or having a different arrangement of parts.
  • a computer device including a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: a text generation request is obtained, and the text generation request carries text keywords And reference text content; extract text structure information from the reference text content, which is used to control the text structure of the text content to be generated; generate new text content according to the extracted text structure information and text keywords.
  • extracting text structure information from the reference text content may include: extracting the grammatical structure of the reference text content to obtain the grammatical structure information of the reference text content; The content is split to obtain the word structure information of each text position in the reference text content; the grammatical structure information and the word structure information are used as the text structure information of the reference text content.
  • the reference text content is split to obtain the word structure information of each text position in the reference text content, which may include: splitting the reference text content into text words, Obtain each text word in the reference text content, the part-of-speech information of each text word, and the word position information of each text word in the reference text content; perform text word splitting on each text word to obtain the text word information of each text word and The word position information of each text word in the text word; each part-of-speech information, word position information, text word information, and position information are used as the word structure information of each word in the reference text content.
  • generating new text content based on the extracted text structure information and text keywords may include: determining the part-of-speech information of the text keywords according to the text keywords; The part-of-speech information of the word and the word structure information of each text position in the text structure information determine the part-of-speech information of each text word to be predicted; perform the text based on the text keywords, the part-of-speech information of each word to be predicted, and the text structure information Word prediction, get each predicted text word; generate new text content according to each predicted text word.
  • the processor when the processor executes the computer program, it realizes the prediction of text words based on the text keywords, the part-of-speech information of each text word to be predicted, and the text structure information, which may include: using the text keyword as the current predicted word According to the part-of-speech information and text structure information of the text word to be predicted, the text word is predicted to obtain the predicted text word; the obtained predicted text word and text keyword are used as the current predicted word, and According to the part-of-speech information and text structure information of the remaining text words to be predicted, the prediction of the text words is continued until the prediction of all the text words to be predicted is completed.
  • the processor may also implement the following steps when executing the computer program: upload at least one of text keywords, reference text content, text structure information, and new text content to the blockchain and store it in the district In the node of the block chain.
  • a computer-readable storage medium may be non-volatile or volatile, and a computer program is stored thereon.
  • the computer program is executed by a processor, The following steps are implemented: Obtain a text generation request, which carries text keywords and reference text content; extract text structure information from the reference text content, and the text structure information is used to control the text structure of the text content to be generated; according to the extraction The text structure information and text keywords of the new text content are generated.
  • extracting text structure information from the reference text content may include: extracting the grammatical structure of the reference text content to obtain the grammatical structure information of the reference text content; The text content is split to obtain the word structure information of each text position in the reference text content; the grammatical structure information and the word structure information are used as the text structure information of the reference text content.
  • the reference text content is split to obtain the word structure information of each text position in the reference text content, which may include: splitting the reference text content into text words , Get each text word in the reference text content, the part-of-speech information of each text word, and the word position information of each text word in the reference text content; perform text word splitting on each text word to obtain the text word information of each text word And the word position information of each text word in the text word; each part-of-speech information, word position information, text word information, and position information are used as the word structure information of each word in the reference text content.
  • generating new text content based on the extracted text structure information and text keywords may include: determining the part-of-speech information of the text keywords according to the text keywords; The part-of-speech information of the keywords and the word structure information of each text position in the text structure information determine the part-of-speech information of each text word to be predicted; based on the text keywords, the part-of-speech information of each word to be predicted, and the text structure information Prediction of text words to obtain each predicted text word; generate new text content according to each predicted text word.
  • performing text word prediction based on text keywords, part-of-speech information of each text word to be predicted, and text structure information may include: using the text keyword as the current prediction According to the part-of-speech information and text structure information of each text word to be predicted, the text word is predicted to obtain the predicted text word; the obtained predicted text word and text keyword are used as the current predicted word, And according to the part of speech information and text structure information of the remaining text words to be predicted, the prediction of the text words is continued until the prediction of all the text words to be predicted is completed.
  • the following steps can also be implemented: upload at least one of text keywords, reference text content, text structure information, and new text content to the blockchain, and store it in In the nodes of the blockchain.
  • Non-volatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Biophysics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Machine Translation (AREA)

Abstract

本申请涉及人工智能领域,特别是涉及一种基于人工智能的文本生成方法、装置、计算机设备和介质。所述方法包括:获取文本生成请求,文本生成请求携带有文本关键词以及参考文本内容;从参考文本内容中提取出文本结构信息,文本结构信息用于控制待生成的文本内容的文本结构;根据提取的文本结构信息以及文本关键词,生成新的文本内容。采用本方法能够提升文本内容生成准确性。同时,本申请还涉及区块链技术,其中,文本关键词、参考文本内容、文本结构信息以及新的文本内容等均可以存储与区块链中。

Description

基于人工智能的文本生成方法、装置、计算机设备和介质
本申请要求于2020年06月16日提交中国专利局、申请号为202010548649.2,发明名称为“基于人工智能的文本生成方法、装置、计算机设备和介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,特别是涉及一种基于人工智能的文本生成方法、装置、计算机设备和介质。
背景技术
文本生成在今天被广泛应用于各种自然语言处理任务中,如语音识别、机器翻译、文档分类、人机对话等。
在传统方式中,通过神经网络来学习字或词之间的统计关联,然后根据学习的结果进行预测,以得到预测结果。
但是,发明人意识到在该种方式中,文本内容的生成随机性较大,使得生成的文本内容准确性较低。
技术问题
本申请的主要目的为提供一种能够提升文本内容生成准确性的基于人工智能的文本生成方法、装置、计算机设备和介质,旨在解决生成的文本内容准确性较低的问题。
技术解决方案
一种基于人工智能的文本生成方法,所述方法包括:
获取文本生成请求,文本生成请求携带有文本关键词以及参考文本内容;
从参考文本内容中提取出文本结构信息,文本结构信息用于控制待生成的文本内容的文本结构;
根据提取的文本结构信息以及文本关键词,生成新的文本内容。
一种基于人工智能的文本生成装置,所述装置包括:
文本生成请求获取模块,用于获取文本生成请求,文本生成请求携带有文本关键词以及参考文本内容;
文本结构信息提取模块,用于从参考文本内容中提取出文本结构信息,文本结构信息用于控制待生成的文本内容的文本结构;
文本内容生成模块,用于根据提取的文本结构信息以及文本关键词,生成新的文本内容。
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现基于人工智能的文本生成方法;
其中,所述基于人工智能的文本生成方法的步骤包括:
获取文本生成请求,所述文本生成请求携带有文本关键词以及参考文本内容;
从所述参考文本内容中提取出文本结构信息,所述文本结构信息用于控制待生成的文本内容的文本结构;
根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容。
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现基于人工智能的文本生成方法;
其中,所述基于人工智能的文本生成方法的步骤包括:
获取文本生成请求,所述文本生成请求携带有文本关键词以及参考文本内容;
从所述参考文本内容中提取出文本结构信息,所述文本结构信息用于控制待生成的文本 内容的文本结构;
根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容。
有益效果
上述基于人工智能的文本生成方法、装置、计算机设备和介质,通过对参考文本内容进行文本结构信息的提取,并生成对应文本结构信息的文本内容,使得文本内容生成符合参考文本内容的文本结构要求,提升文本生成的准确性。
附图说明
图1为一个实施例中基于人工智能的文本生成方法的应用场景图;
图2为一个实施例中基于人工智能的文本生成方法的流程示意图;
图3为另一个实施例中基于人工智能的文本生成方法的流程示意图;
图4为一个实施例中基于人工智能的文本生成装置的结构框图;
图5为一个实施例中计算机设备的内部结构图。
本发明的最佳实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供的基于人工智能的文本生成方法,可以应用于如图1所示的应用环境中。其中,终端102通过网络与服务器104进行通信。具体地,终端102接收用户输入,生成文本生成请求,将生成的文本生成请求发送至服务器104,文本生成请求携带有文本关键词以及参考文本内容。服务器104在获取到文本生成请求后,从文本生成请求携带的参考文本内容中提取出文本结构信息。然后服务器104根据提取的文本结构信息以及文本关键词,生成新的文本内容。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,服务器104可以用独立的服务器或者是多个服务器组成的服务器集群来实现。
在一个实施例中,如图2所示,提供了一种基于人工智能的文本生成方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:
步骤S202,获取文本生成请求,文本生成请求携带有文本关键词以及参考文本内容。
其中,文本生成请求是指终端发送的用于生成文本内容的请求,文本生成请求中携带有待生成文本内容的文本关键词以及参考文本内容。
参考文本内容是指用于参考的文本内容,或者也可以称之为文本模板。
在本实施例中,用户可以根据所期望生成的文本,通过终端选取对应的参考文本内容,生成文本生成请求并发送服务器。
在本实施例中,服务器接收到文本生成请求后,可以获取文本生成请求中携带的文本关键词以及参考文本内容,并进行后续的处理。
步骤S204,从参考文本内容中提取出文本结构信息,文本结构信息用于控制待生成的文本内容的文本结构。
其中,文本结构信息是指文本内容的结构信息,可以包括语法结构信息以及字词结构信息。文本结构信息用于控制待生成的文本内容的文本结构。
具体地,文本语法信息是指文本语句的主谓宾结构、文本语句的主干结构、修饰结构等信息。字词结构信息是指文本内容中各个字词的结构信息等。
在本实施例中,服务器获取到文本参考请求后,可以根据对文本参考请求中的参考文本内容进行提取,以提取到文本结构信息,例如,可以通过对参考文本内容深网络模型以及各种语法工具中的一种或者多种进行文本结构信息的提取,以得到参考文本内容的文本结构信 息。
在本实施例中,根据文本参考请求中携带的参考文本内容的不同,服务器可以提取得到对应不同参考文本内容的文本结构信息,例如,对于请求1,其参考文本内容为主谓宾结构的文本内容,如“他打篮球”,则提取的文本结构信息可以包括主谓宾结构信息,对于文本2,其考文本内容为定主补谓结构的文本内容,如“美丽的天空总令人神往”,则提取的文本结构信息可以包括定主补谓结构信息。
步骤S206,根据提取的文本结构信息以及文本关键词,生成新的文本内容。
具体地,服务器可以根据提取得到的文本结构信息以及文本关键词,进行文本字词的预测,并基于预测得到的文本字词以及文本关键词,生成新的文本内容。
在本实施例中,基于文本关键词的不同和/或文本结构信息的不同,生成的新的文本内容不同,例如,对于主谓宾结构的文本结构信息,生成的新的文本内容也是主谓宾结构,对于定主补谓结构的文本结构信息,生成的新的文本内容也是定主补谓结构。
上述基于人工智能的文本生成方法中,通过获取文本生成请求,文本生成请求携带有文本关键词以及参考文本内容,然后从参考文本内容中提取出文本结构信息,文本结构信息用于控制待生成的文本内容的文本结构,进一步根据提取的文本结构信息以及文本关键词,生成新的文本内容。从而,可以通过对参考文本内容进行文本结构信息的提取,并生成对应文本结构信息的文本内容,使得文本内容生成符合参考文本内容的文本结构要求,提升文本生成的准确性。并且,通过提取不同的文本结构信息,可以生成对应不同文本结构的文本内容,使得生成的文本内容的文本结构可控,提升生成的文本内容的文本结构的多样性。
在其中一个实施例中,从参考文本内容中提取出文本结构信息,可以包括:对参考文本内容进行语法结构的提取,得到参考文本内容的语法结构信息;对参考文本内容进行拆分,得到参考文本内容中各文本位置的字词结构信息;将语法结构信息和字词结构信息作为参考文本内容的文本结构信息。
其中,语法结构信息是指文本语句的主体结构信息,可以包括前文所述的主谓宾结构、文本语句的主干结构、修饰结构等信息。
字词结构信息是指文本语句中各个字或者词的位置结构信息以及各字词的词性信息等。
在本实施例中,参考图3,服务器可以通过神经网络模型,对参考文本内容进行语法结构信息的提取,如,服务器将参考文本内容输入ON-LSTM模型,以输出参考文本内容的语法结构信息,即得到sentence level structure。例如,参考文本内容为“我是平安的员工”,则服务器可以通过模型提取出该参考文本内容为主谓宾结构+定语修饰词结构的语法结构信息,以及确定文本语句的主干结构为“我是员工”,修饰结构为“平安的”。
在本实施例中,进行语法结构信息提取的模型可以是预先训练好的模型,服务器通过大量的训练集数据对模型训练并进行测试,以得到训练完成的模型。
进一步,服务器可以通过语法工具对参考文本内容进行拆分,如Thulac等,以得到参考文本内容中各文本位置的文本字词的字词结构信息。
在其中一个实施例中,对参考文本内容进行拆分,得到参考文本内容中各文本位置的字词结构信息,可以包括:对参考文本内容进行文本词的拆分,得到参考文本内容中的各文本词、各文本词的词性信息以及各文本词在参考文本内容中的词位置信息;对各文本词进行文本字的拆分,得到各文本字的文本字信息以及各文本字在文本词中的字位置信息;将各词性信息、词位置信息、文本字信息以及位置信息作为参考文本内容中各字词的字词结构信息。
其中,文本词是指组成文本内容的词语,可以是单个字构成的词语,也可以是多个字构成的词语,如对于参考文本内容“我是平安的员工”,文本词“我”以及“是”等是组成文本内容的一个词,“员工”“平安的”等也是组成文本内容的一个词。
词性信息是指指示各个文本词的词性的信息,例如,名词、动词、代词、形容词等,例如,“我”是代词,“是”是动词,“员工”是名词,“平安的”是形容词。
词位置信息是指各文本词在文本内容中的位置信息,例如,继续引用前例,“我”是参 考文本内容中的第一文本位置的词,则其位置信息即为文本内容中的首位置词,同理,“是”和“平安的”是参考文本内容的中间位置词,其位置信息分别中间位置词1、中间位置词2,“员工”为句尾词。
文本字信息是指各文本词中各文本字的信息,字位置信息是指各文本字在文本词中的位置信息,例如,对于文本词“平安的”,则“平”是中间位置词2中的第一个字,“安”是中间位置词2中的第二个字,“的”是中间位置词2中的第三个字。
在本实施例中,继续参考图3,服务器通过语法工具,对参考文本内容进行文本词的拆分,然后进行文本字的拆分,以得到参考文本内容中个文本位置的字词结构信息。
在本实施例中,各文本位置的字词结构信息可以通过如下方式确定,即首先确定各词语是否为单字词,若词语为单字词,则通过字母S表示,S是single的缩写,若词语为非单字词,则可以根据各个字在词语中的位置加上词语的词性表示各个字。例如,对于参考文本内容“我是平安的员工”,“我”是单字词,可以表示为S,“平安的”为非单字词,且“平安的”为形容词,可以“平”表示为“B+adj”,“安”表示为“M+adj”,“的”表示为“E+adj”。其中,B是begin的缩写,表示首位置,M是middle的缩写,表示中间位置,E是End的缩写,表示末尾位置,adj表示形容词。
上述实施例中,通过分别进行语法结构信息以及字词结构信息的提取,使得生成的文本结构信息中既包含参考文本内容的主体结构信息,也包含各个字词结构的信息,使得文本结构信息对各文本字词的结构的表达更加准确,保障了信息的完整性。
在其中一个实施例中,根据提取的文本结构信息以及文本关键词,生成新的文本内容,可以包括:根据文本关键词,确定文本关键词的词性信息;根据文本关键词的词性信息以及文本结构信息中各文本位置的字词结构信息,确定各待预测文本字词的词性信息;根据文本关键词、各待预测本文字词的词性信息以及文本结构信息,进行文本字词预测,得到各预测文本字词;根据各预测文本字词生成新的文本内容。
具体地,服务器可以根据从文本生成请求中携带的文本关键词,确定文本关键词的词性信息,例如,对于文本关键词“客户”,可以确定其为名词。
进一步,服务器可以根据文本结构信息中各文本位置的字词结构信息,确定待预测文本字词的词性信息,例如,确定了文本关键词“客户”为名词,则根据各字词结构信息,可以确定待预测文本字词分别为代词、动词、形容词等。以及服务器可以根据文本字词信息中的文本字信息以及字位置信息,确定各待预测文本字词的字数量、在文本句中的位置信息等。
进一步,服务器根据文本关键词、各待预测本文字词的词性信息以及获取的参考文本内容的文本结构信息,对带预测文本字词的各个文本字词进行预测,以得到各预测文本字词。
进一步,服务器根据得到的各预测文本字词、文本关键词以及文本结构信息,生成新的文本内容。例如,预测文本字词是“你”、“是”、“平安的”,文本关键词为“客户”,以及各字词的文本结构信息,可以得到新的文本内容为“你是平安的客户”。
在本实施例中,对于相同的预测文本字词以及文本关键词,文本结构信息不同,得到的新的文本内容不同。例如,同样是“你”、“是”、“平安的”以及“客户”等文本字词,若参考文本内容为“平安的员工是你”,则基于提取的文本结构信息生成的新的文本内容为“平安的客户是你”。
可选的,文本关键词也可以是多个词,例如,文本关键词为“我”、“客户”,则生成的新的文本内容可以是“我是平安的客户”。
在本实施例中,当文本生成请求中携带的文本关键词数量越多,则生成的文本内容更贴合文本生成请求,生成的文本内容更加准确。例如,文本关键词为“他”、“公司的”、“同事”,则生成的新的文本内容可以是“他是公司的同事”。
上述实施例中,根据文本关键词以及文本结构信息,确定文本关键词的字词结构信息以及各待预测文本字词的字词结构信息,然后进行文本字词的预测。从而,可以根据各待预测文本字词的字词结构信息对各待预测文本字词进行准确预测,提升预测的准确性。并且,通 过各待预测文本字词的字词结构信息对以及参考文本内容的语法结构信息对各文本字词进行预测,使得可以对生成的文本内容的文本结构进行控制,可以提升生成的文本内容的结构多样性。
在其中一个实施例中,根据文本关键词、各待预测本文字词的词性信息以及文本结构信息,进行文本字词预测,可以包括:将文本关键词作为当前预测字词,并根据各待预测本文字词的词性信息以及文本结构信息,进行文本字词的预测,得到预测文本字词;将已得到的预测文本字词以及文本关键词作为当前预测字词,并根据剩余的各待预测本文字词的词性信息以及文本结构信息,继续进行文本字词的预测,直至完成所有待预测本文字词的预测。
在本实施例中,服务器在进行文本字词的预测的时候,先以文本关键词作为当前预测字词,进行文本字词的预测,然后在以得到的预测文本字词以及文本关键词,继续对还未预测的待预测文本字词进行预测。例如,文本关键词为“客户”,则服务器可能先得到预测文本字词“是”,然后根据关键词“客户”、预测文本字词“是”以及文本结构信息继续进行预测,如得到预测词“他”。以此往复,直至完成文本结构信息确定的所有的待预测文本字词的预测。
在本实施例中,服务器对剩余的待预测本文字词的预测是根据已得到的各预测文本字词和关键词的概率对未预测的待预测文本字词的概率进行预测,然后基于得到的各预测结果,继续对未预测的待预测文本字词继续进行预测。例如,根据关键词“客户”得到预测文本字词的“是”的概率为80%,“不是”的概率是20%,然后在进行后续待预测文本字词的预测,例如,进一步根据“客户”和“是”,得到“他”的概率为50%,“你”的概率为30%,“我”的概率为20%等,根据“客户”和“不是”,得到“他”的概率为80%,“你”的概率为25%,“我”的概率为5%等。依次类推,直至完成所有待预测文本字词的预测。
在本实施例中,服务器在得到各预测文本字词的概率之后,可以通过对所有的预测文本字词的概率进行联乘,以得到各预测文本内容的概率,并确定概率最高的预测文本内容为新的文本内容。例如,继续延用前例,预测文本字词“是”的概率为80%,在此基础上“我”的概率为90%,进一步,“平安的”概率为50%,则可以得到预测文本句“我是平安的客户”的概率为36%,而对于预测文本字词“不是”的概率为70%,在此基础上“他”的概率为80%,“平安的”概率为60%,则可以得到预测文本句“他是平安的客户”的概率为33.6%。则以此类推,可以得到多个预测文本内容的概率。然后服务器从中确定概率值最高的一个为新的文本内容并输出。
在本实施例中,预测文本内容的概率计算公式如公式(1)所示:
Figure PCTCN2020124736-appb-000001
其中,P(s)表示预测文本内容的概率值,n表示预测文本内容中字词的数量,P(ω i1,...,ω i-1)表示各文本字词的概率,下标表示各文本字词在文本内容中的位置。
上述实施例中,根据将已得到的预测文本字词以及文本关键词作为当前预测字词,并根据剩余各待预测本文字词的字词结构信息以及语法结构信息,继续进行文本字词的预测,从而,使得预测在后的预测文本字词包含了已得到的预测文本字词的预测结果,可以提升预测的准确性,进而可以提升生成的文本内容的准确性。
在其中一个实施例中,服务器对参考文本内容进行文本结构信息的提取,以及确定文本关键词的词性信息、待预测文本字词的词性信息以及进行文本字词预测可以是通过预测模型进行。
例如,继续参考图3,服务器参考文本内容以及文本关键词输入预测模型,以通过预测模型进行文本结构信息的提取,即进行句子级的语法结构信息的提取(Sentence level structure)、词结构信息的提取(Word level POS)以及字结构信息的提取(Character level POS),然后进行归一化处理(Normalization)后,通Embedding方式转换为向量,如512维度的向量,以通 过向量的方式表示参考文本内容的语法结构信息和字词结构信息,并进行向量融合,以得到向量表示的对应参考文本内容的结构信息。
进一步,将得到的结构信息输入多头注意力机制(Multi-head Self-attention)层,即multi-head self-attention层以512维度的向量为输入,得到对应的输出。在multi-head self-attention层中,输出与输出之间存在依赖关系。
在本实施例中,Multi-head Self-attention层输出一个512维度的向量,并将输入和输出进行规范化处理(Add&Norm)后得到最终的输出结构信息
同理,在本实施例中,服务器可以将输入的文本关键词进行文本位置嵌入(Text&Position Embed)转换为512维度的向量,输入带有因果遮挡的多头自注意力处理机制(Masked Multi-head Self-attention)层,并输出对应的结果,然后将输入和输出进行规范化处理(Add&Norm)后得到最终的输出文本字词信息。
进一步,服务器将得到的输出结构信息以及输出文本字词信息进行融合并输入一个简单的全连接(Feed Forward)层,得到对应的输出,并将Feed Forward层的输入和输出相加并进行规范化处理(Add&Norm),以得到对应的文本字词预测结果。
进一步,服务器按照如上流程进行多次预测,直至完成多有文本字词的预测。
在本实施例中,模型完成文本字词的预测后,然后通过线性变换(Linear)处理以及逻辑回归(Soft max)后,生成新的文本内容并输出。
在本实施例中,预测模型可以是预先训练完成的模型,服务器可以从训练集数据中获取文本关键词,并将获取的文本关键词以及训练集数据输入初始测试模型,进行文本结构信息的提取以及文本内容的预测训练。
进一步,服务器根据训练得到的文本内容以及训练集数据,计算测试模型的损失值,并根据计算得到的损失值对测试模型不断更新,以得到训练好的测试模型,从而提升生成的文本内容的准确性。
在其中一个实施例中,上述方法还可以包括:将文本关键词、参考文本内容、文本结构信息以及新的文本内容中的至少一个上传至区块链,并存储至区块链的节点中。
其中,区块链是指分布式数据存储、点对点传输、共识机制、加密算法等计算机技术的新型应用模式。区块链(Block chain),本质上是一个去中心化的数据库,是一串使用密码学方法相关联产生的数据块,每一个数据块中包含了一批次网络交易的信息,用于验证其信息的有效性(防伪)和生成下一个区块。
具体地,区块链可以包括区块链底层平台、平台产品服务层以及应用服务层等。
在本实施例中,服务器可以将文本关键词、参考文本内容、文本结构信息以及新的文本内容中的一个或者多个数据上传并存储于区块链的节点中,以保证数据的私密性和安全性。
上述实施例中,通过将文本关键词、参考文本内容、文本结构信息以及新的文本内容中至少一个上传至区块链并存储于区块链的节点中,从而可以保障存储至区块链节点中数据的私密性,可以提升数据的安全性。
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。
在一个实施例中,如图4所示,提供了一种基于人工智能的文本生成装置,包括:文本生成请求获取模块100、文本结构信息提取模块200和文本内容生成模块300,其中:
文本生成请求获取模块100,用于获取文本生成请求,文本生成请求携带有文本关键词以及参考文本内容。
文本结构信息提取模块200,用于从参考文本内容中提取出文本结构信息,文本结构信息 用于控制待生成的文本内容的文本结构。
文本内容生成模块300,用于根据提取的文本结构信息以及文本关键词,生成新的文本内容。
在其中一个实施例中,文本结构信息提取模块200可以包括:
语法结构信息提取子模块,用于对参考文本内容进行语法结构的提取,得到参考文本内容的语法结构信息。
字词结构信息生成子模块,用于对参考文本内容进行拆分,得到参考文本内容中各文本位置的字词结构信息。
文本结构信息生成子模块,用于将语法结构信息和字词结构信息作为参考文本内容的文本结构信息。
在其中一个实施例中,字词结构信息生成子模块可以包括:
第一拆分单元,用于对参考文本内容进行文本词的拆分,得到参考文本内容中的各文本词、各文本词的词性信息以及各文本词在参考文本内容中的词位置信息。
第二拆分单元,用于对各文本词进行文本字的拆分,得到各文本字的文本字信息以及各文本字在文本词中的字位置信息。
字词结构信息生成单元,用于将各词性信息、词位置信息、文本字信息以及位置信息作为参考文本内容中各字词的字词结构信息。
在其中一个实施例中,文本内容生成模块300可以包括:
关键词词性信息确定子模块,用于根据文本关键词,确定文本关键词的词性信息。
待预测文本字词词性信息确定子模块,用于根据文本关键词的词性信息以及文本结构信息中各文本位置的字词结构信息,确定各待预测文本字词的词性信息。
预测子模块,用于根据文本关键词、各待预测本文字词的词性信息以及文本结构信息,进行文本字词预测,得到各预测文本字词。
文本内容生成子模块,用于根据各预测文本字词生成新的文本内容。
在其中一个实施例中,预测子模块可以包括:
预测文本字词生成单元,用于将文本关键词作为当前预测字词,并根据各待预测本文字词的词性信息以及文本结构信息,进行文本字词的预测,得到预测文本字词。
循环预测单元,用于将已得到的预测文本字词以及文本关键词作为当前预测字词,并根据剩余的各待预测本文字词的词性信息以及文本结构信息,继续进行文本字词的预测,直至完成所有待预测本文字词的预测。
在其中一个实施例中,上述装置还可以包括:
存储模块,用于将文本关键词、参考文本内容、文本结构信息以及新的文本内容中的至少一个上传至区块链,并存储至区块链的节点中。
关于基于人工智能的文本生成装置的具体限定可以参见上文中对于基于人工智能的文本生成方法的限定,在此不再赘述。上述基于人工智能的文本生成装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图5所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储文本关键词、参考文本内容、文本结构信息以及新的文本内容等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于人工智能的文本生成方法。
本领域技术人员可以理解,图5中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。
在一个实施例中,提供了一种计算机设备,包括存储器和处理器,该存储器存储有计算机程序,该处理器执行计算机程序时实现以下步骤:获取文本生成请求,文本生成请求携带有文本关键词以及参考文本内容;从参考文本内容中提取出文本结构信息,文本结构信息用于控制待生成的文本内容的文本结构;根据提取的文本结构信息以及文本关键词,生成新的文本内容。
在其中一个实施例中,处理器执行计算机程序时实现从参考文本内容中提取出文本结构信息,可以包括:对参考文本内容进行语法结构的提取,得到参考文本内容的语法结构信息;对参考文本内容进行拆分,得到参考文本内容中各文本位置的字词结构信息;将语法结构信息和字词结构信息作为参考文本内容的文本结构信息。
在其中一个实施例中,处理器执行计算机程序时实现对参考文本内容进行拆分,得到参考文本内容中各文本位置的字词结构信息,可以包括:对参考文本内容进行文本词的拆分,得到参考文本内容中的各文本词、各文本词的词性信息以及各文本词在参考文本内容中的词位置信息;对各文本词进行文本字的拆分,得到各文本字的文本字信息以及各文本字在文本词中的字位置信息;将各词性信息、词位置信息、文本字信息以及位置信息作为参考文本内容中各字词的字词结构信息。
在其中一个实施例中,处理器执行计算机程序时实现根据提取的文本结构信息以及文本关键词,生成新的文本内容,可以包括:根据文本关键词,确定文本关键词的词性信息;根据文本关键词的词性信息以及文本结构信息中各文本位置的字词结构信息,确定各待预测文本字词的词性信息;根据文本关键词、各待预测本文字词的词性信息以及文本结构信息,进行文本字词预测,得到各预测文本字词;根据各预测文本字词生成新的文本内容。
在其中一个实施例中,处理器执行计算机程序时实现根据文本关键词、各待预测本文字词的词性信息以及文本结构信息,进行文本字词预测,可以包括:将文本关键词作为当前预测字词,并根据各待预测本文字词的词性信息以及文本结构信息,进行文本字词的预测,得到预测文本字词;将已得到的预测文本字词以及文本关键词作为当前预测字词,并根据剩余的各待预测本文字词的词性信息以及文本结构信息,继续进行文本字词的预测,直至完成所有待预测本文字词的预测。
在其中一个实施例中,处理器执行计算机程序时还可以实现如下步骤:将文本关键词、参考文本内容、文本结构信息以及新的文本内容中的至少一个上传至区块链,并存储至区块链的节点中。
在一个实施例中,提供了一种计算机可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,其上存储有计算机程序,计算机程序被处理器执行时实现以下步骤:获取文本生成请求,文本生成请求携带有文本关键词以及参考文本内容;从参考文本内容中提取出文本结构信息,文本结构信息用于控制待生成的文本内容的文本结构;根据提取的文本结构信息以及文本关键词,生成新的文本内容。
在其中一个实施例中,计算机程序被处理器执行时实现从参考文本内容中提取出文本结构信息,可以包括:对参考文本内容进行语法结构的提取,得到参考文本内容的语法结构信息;对参考文本内容进行拆分,得到参考文本内容中各文本位置的字词结构信息;将语法结构信息和字词结构信息作为参考文本内容的文本结构信息。
在其中一个实施例中,计算机程序被处理器执行时实现对参考文本内容进行拆分,得到参考文本内容中各文本位置的字词结构信息,可以包括:对参考文本内容进行文本词的拆分,得到参考文本内容中的各文本词、各文本词的词性信息以及各文本词在参考文本内容中的词位置信息;对各文本词进行文本字的拆分,得到各文本字的文本字信息以及各文本字在文本 词中的字位置信息;将各词性信息、词位置信息、文本字信息以及位置信息作为参考文本内容中各字词的字词结构信息。
在其中一个实施例中,计算机程序被处理器执行时实现根据提取的文本结构信息以及文本关键词,生成新的文本内容,可以包括:根据文本关键词,确定文本关键词的词性信息;根据文本关键词的词性信息以及文本结构信息中各文本位置的字词结构信息,确定各待预测文本字词的词性信息;根据文本关键词、各待预测本文字词的词性信息以及文本结构信息,进行文本字词预测,得到各预测文本字词;根据各预测文本字词生成新的文本内容。
在其中一个实施例中,计算机程序被处理器执行时实现根据文本关键词、各待预测本文字词的词性信息以及文本结构信息,进行文本字词预测,可以包括:将文本关键词作为当前预测字词,并根据各待预测本文字词的词性信息以及文本结构信息,进行文本字词的预测,得到预测文本字词;将已得到的预测文本字词以及文本关键词作为当前预测字词,并根据剩余的各待预测本文字词的词性信息以及文本结构信息,继续进行文本字词的预测,直至完成所有待预测本文字词的预测。
在其中一个实施例中,计算机程序被处理器执行时还可以实现如下步骤:将文本关键词、参考文本内容、文本结构信息以及新的文本内容中的至少一个上传至区块链,并存储至区块链的节点中。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (20)

  1. 一种基于人工智能的文本生成方法,其中,所述方法包括:
    获取文本生成请求,所述文本生成请求携带有文本关键词以及参考文本内容;
    从所述参考文本内容中提取出文本结构信息,所述文本结构信息用于控制待生成的文本内容的文本结构;
    根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容。
  2. 根据权利要求1所述的方法,其中,所述从所述参考文本内容中提取出文本结构信息,包括:
    对所述参考文本内容进行语法结构的提取,得到所述参考文本内容的语法结构信息;
    对所述参考文本内容进行拆分,得到所述参考文本内容中各文本位置的字词结构信息;
    将所述语法结构信息和所述字词结构信息作为所述参考文本内容的文本结构信息。
  3. 根据权利要求2所述的方法,其中,所述对所述参考文本内容进行拆分,得到所述参考文本内容中各文本位置的字词结构信息,包括:
    对所述参考文本内容进行文本词的拆分,得到所述参考文本内容中的各文本词、各所述文本词的词性信息以及各所述文本词在所述参考文本内容中的词位置信息;
    对各所述文本词进行文本字的拆分,得到各文本字的文本字信息以及各所述文本字在所述文本词中的字位置信息;
    将各所述词性信息、所述词位置信息、所述文本字信息以及所述位置信息作为所述参考文本内容中各字词的字词结构信息。
  4. 根据权利要求1所述的方法,其中,所述根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容,包括:
    根据所述文本关键词,确定所述文本关键词的词性信息;
    根据所述文本关键词的词性信息以及文本结构信息中各文本位置的字词结构信息,确定各待预测文本字词的词性信息;
    根据所述文本关键词、各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词预测,得到各预测文本字词;
    根据各所述预测文本字词生成新的文本内容。
  5. 根据权利要求4所述的方法,其中,所述根据所述文本关键词、各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词预测,包括:
    将所述文本关键词作为当前预测字词,并根据各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词的预测,得到预测文本字词;
    将已得到的预测文本字词以及所述文本关键词作为当前预测字词,并根据剩余的各所述待预测本文字词的词性信息以及所述文本结构信息,继续进行文本字词的预测,直至完成所有待预测本文字词的预测。
  6. 根据权利要求1所述的方法,其中,所述方法还包括:
    将所述文本关键词、所述参考文本内容、所述文本结构信息以及所述新的文本内容中的至少一个上传至区块链,并存储至区块链的节点中。
  7. 一种基于人工智能的文本生成装置,其中,所述装置包括:
    文本生成请求获取模块,用于获取文本生成请求,所述文本生成请求携带有文本关键词以及参考文本内容;
    文本结构信息提取模块,用于从所述参考文本内容中提取出文本结构信息,所述文本结构信息用于控制待生成的文本内容的文本结构;
    文本内容生成模块,用于根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容。
  8. 根据权利要求7所述的装置,其中,所述文本结构信息提取模块,包括:
    语法结构信息提取子模块,用于对所述参考文本内容进行语法结构的提取,得到所述参考文本内容的语法结构信息;
    字词结构信息生成子模块,用于对所述参考文本内容进行拆分,得到所述参考文本内容中各文本位置的字词结构信息;
    文本结构信息生成子模块,用于将所述语法结构信息和所述字词结构信息作为所述参考文本内容的文本结构信息。
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所述处理器执行所述计算机程序时实现基于人工智能的文本生成方法;
    其中,所述基于人工智能的文本生成方法的步骤包括:
    获取文本生成请求,所述文本生成请求携带有文本关键词以及参考文本内容;
    从所述参考文本内容中提取出文本结构信息,所述文本结构信息用于控制待生成的文本内容的文本结构;
    根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容。
  10. 根据权利要求9所述的计算机设备,其中,所述从所述参考文本内容中提取出文本结构信息,包括:
    对所述参考文本内容进行语法结构的提取,得到所述参考文本内容的语法结构信息;
    对所述参考文本内容进行拆分,得到所述参考文本内容中各文本位置的字词结构信息;
    将所述语法结构信息和所述字词结构信息作为所述参考文本内容的文本结构信息。
  11. 根据权利要求10所述的计算机设备,其中,所述对所述参考文本内容进行拆分,得到所述参考文本内容中各文本位置的字词结构信息,包括:
    对所述参考文本内容进行文本词的拆分,得到所述参考文本内容中的各文本词、各所述文本词的词性信息以及各所述文本词在所述参考文本内容中的词位置信息;
    对各所述文本词进行文本字的拆分,得到各文本字的文本字信息以及各所述文本字在所述文本词中的字位置信息;
    将各所述词性信息、所述词位置信息、所述文本字信息以及所述位置信息作为所述参考文本内容中各字词的字词结构信息。
  12. 根据权利要求9所述的计算机设备,其中,所述根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容,包括:
    根据所述文本关键词,确定所述文本关键词的词性信息;
    根据所述文本关键词的词性信息以及文本结构信息中各文本位置的字词结构信息,确定各待预测文本字词的词性信息;
    根据所述文本关键词、各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词预测,得到各预测文本字词;
    根据各所述预测文本字词生成新的文本内容。
  13. 根据权利要求12所述的计算机设备,其中,所述根据所述文本关键词、各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词预测,包括:
    将所述文本关键词作为当前预测字词,并根据各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词的预测,得到预测文本字词;
    将已得到的预测文本字词以及所述文本关键词作为当前预测字词,并根据剩余的各所述待预测本文字词的词性信息以及所述文本结构信息,继续进行文本字词的预测,直至完成所有待预测本文字词的预测。
  14. 根据权利要求9所述的计算机设备,其中,所述方法还包括:
    将所述文本关键词、所述参考文本内容、所述文本结构信息以及所述新的文本内容中的至少一个上传至区块链,并存储至区块链的节点中。
  15. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现基于人工智能的文本生成方法;
    其中,所述基于人工智能的文本生成方法的步骤包括:
    获取文本生成请求,所述文本生成请求携带有文本关键词以及参考文本内容;
    从所述参考文本内容中提取出文本结构信息,所述文本结构信息用于控制待生成的文本内容的文本结构;
    根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容。
  16. 根据权利要求15所述的计算机可读存储介质,其中,所述从所述参考文本内容中提取出文本结构信息,包括:
    对所述参考文本内容进行语法结构的提取,得到所述参考文本内容的语法结构信息;
    对所述参考文本内容进行拆分,得到所述参考文本内容中各文本位置的字词结构信息;
    将所述语法结构信息和所述字词结构信息作为所述参考文本内容的文本结构信息。
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述对所述参考文本内容进行拆分,得到所述参考文本内容中各文本位置的字词结构信息,包括:
    对所述参考文本内容进行文本词的拆分,得到所述参考文本内容中的各文本词、各所述文本词的词性信息以及各所述文本词在所述参考文本内容中的词位置信息;
    对各所述文本词进行文本字的拆分,得到各文本字的文本字信息以及各所述文本字在所述文本词中的字位置信息;
    将各所述词性信息、所述词位置信息、所述文本字信息以及所述位置信息作为所述参考文本内容中各字词的字词结构信息。
  18. 根据权利要求15所述的计算机可读存储介质,其中,所述根据提取的所述文本结构信息以及所述文本关键词,生成新的文本内容,包括:
    根据所述文本关键词,确定所述文本关键词的词性信息;
    根据所述文本关键词的词性信息以及文本结构信息中各文本位置的字词结构信息,确定各待预测文本字词的词性信息;
    根据所述文本关键词、各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词预测,得到各预测文本字词;
    根据各所述预测文本字词生成新的文本内容。
  19. 根据权利要求18所述的计算机可读存储介质,其中,所述根据所述文本关键词、各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词预测,包括:
    将所述文本关键词作为当前预测字词,并根据各所述待预测本文字词的词性信息以及所述文本结构信息,进行文本字词的预测,得到预测文本字词;
    将已得到的预测文本字词以及所述文本关键词作为当前预测字词,并根据剩余的各所述待预测本文字词的词性信息以及所述文本结构信息,继续进行文本字词的预测,直至完成所有待预测本文字词的预测。
  20. 根据权利要求15所述的计算机可读存储介质,其中,所述方法还包括:
    将所述文本关键词、所述参考文本内容、所述文本结构信息以及所述新的文本内容中的至少一个上传至区块链,并存储至区块链的节点中。
PCT/CN2020/124736 2020-06-16 2020-10-29 基于人工智能的文本生成方法、装置、计算机设备和介质 WO2021139344A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010548649.2A CN111709229A (zh) 2020-06-16 2020-06-16 基于人工智能的文本生成方法、装置、计算机设备和介质
CN202010548649.2 2020-06-16

Publications (1)

Publication Number Publication Date
WO2021139344A1 true WO2021139344A1 (zh) 2021-07-15

Family

ID=72540585

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/124736 WO2021139344A1 (zh) 2020-06-16 2020-10-29 基于人工智能的文本生成方法、装置、计算机设备和介质

Country Status (2)

Country Link
CN (1) CN111709229A (zh)
WO (1) WO2021139344A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111709229A (zh) * 2020-06-16 2020-09-25 平安科技(深圳)有限公司 基于人工智能的文本生成方法、装置、计算机设备和介质
CN112668306B (zh) * 2020-12-22 2021-07-27 延边大学 一种基于语句甄别识别和强化学习动作设计的语言处理方法和系统
CN113779937A (zh) * 2021-09-27 2021-12-10 平安资产管理有限责任公司 基于人工智能的文本内容转换方法、装置、设备和介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150324446A1 (en) * 2012-12-20 2015-11-12 Koninklijke Philips N.V. System and method for searching a labeled predominantly non-textual item
CN109446513A (zh) * 2018-09-18 2019-03-08 中国电子科技集团公司第二十八研究所 一种基于自然语言理解的文本中事件的抽取方法
CN110457718A (zh) * 2019-08-21 2019-11-15 腾讯科技(深圳)有限公司 一种文本生成方法、装置、计算机设备及存储介质
CN110738026A (zh) * 2019-10-23 2020-01-31 腾讯科技(深圳)有限公司 用于生成描述文本的方法和设备
CN111178053A (zh) * 2019-12-30 2020-05-19 电子科技大学 一种结合语义和文本结构进行生成式摘要抽取的文本生成方法
CN111709229A (zh) * 2020-06-16 2020-09-25 平安科技(深圳)有限公司 基于人工智能的文本生成方法、装置、计算机设备和介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150324446A1 (en) * 2012-12-20 2015-11-12 Koninklijke Philips N.V. System and method for searching a labeled predominantly non-textual item
CN109446513A (zh) * 2018-09-18 2019-03-08 中国电子科技集团公司第二十八研究所 一种基于自然语言理解的文本中事件的抽取方法
CN110457718A (zh) * 2019-08-21 2019-11-15 腾讯科技(深圳)有限公司 一种文本生成方法、装置、计算机设备及存储介质
CN110738026A (zh) * 2019-10-23 2020-01-31 腾讯科技(深圳)有限公司 用于生成描述文本的方法和设备
CN111178053A (zh) * 2019-12-30 2020-05-19 电子科技大学 一种结合语义和文本结构进行生成式摘要抽取的文本生成方法
CN111709229A (zh) * 2020-06-16 2020-09-25 平安科技(深圳)有限公司 基于人工智能的文本生成方法、装置、计算机设备和介质

Also Published As

Publication number Publication date
CN111709229A (zh) 2020-09-25

Similar Documents

Publication Publication Date Title
JP6972265B2 (ja) ポインタセンチネル混合アーキテクチャ
US11321542B2 (en) Processing text sequences using neural networks
WO2021047286A1 (zh) 文本处理模型的训练方法、文本处理方法及装置
WO2021139344A1 (zh) 基于人工智能的文本生成方法、装置、计算机设备和介质
US11741109B2 (en) Dialogue system, a method of obtaining a response from a dialogue system, and a method of training a dialogue system
CN111061847A (zh) 对话生成及语料扩充方法、装置、计算机设备和存储介质
JP2021152963A (ja) 語義特徴の生成方法、モデルトレーニング方法、装置、機器、媒体及びプログラム
CN114830148A (zh) 可控制有基准的文本生成
WO2021082427A1 (zh) 韵律控制的诗词生成方法、装置、设备及存储介质
CN107273356A (zh) 基于人工智能的分词方法、装置、服务器和存储介质
CN109766418B (zh) 用于输出信息的方法和装置
WO2019220113A1 (en) Device and method for natural language processing
CN110598210B (zh) 实体识别模型训练、实体识别方法、装置、设备及介质
KR20220164559A (ko) 희소 어텐션 메커니즘이 있는 어텐션 신경망
US11748569B2 (en) System and method for query authorization and response generation using machine learning
CN110781666B (zh) 基于生成式对抗网络的自然语言处理文本建模
CN112052329A (zh) 文本摘要生成方法、装置、计算机设备及可读存储介质
CN113420869B (zh) 基于全方向注意力的翻译方法及其相关设备
Tiwari et al. Normalization of social media text using deep neural networks
CN110780850B (zh) 需求用例辅助生成方法、装置、计算机设备及存储介质
US20240144049A1 (en) Computerized question answering based on evidence chains
CN113283240B (zh) 共指消解方法及电子设备
WO2023286139A1 (ja) 学習方法、学習システム及び学習プログラム
CN117892733A (zh) 基于联合多语义信息的文本匹配方法和系统
CN117633210A (zh) 基于知识增强的文本摘要生成方法、装置、设备及介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20912077

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20912077

Country of ref document: EP

Kind code of ref document: A1