WO2020010955A1 - Keyword extraction method based on reinforcement learning, and computer device and storage medium - Google Patents

Keyword extraction method based on reinforcement learning, and computer device and storage medium Download PDF

Info

Publication number
WO2020010955A1
WO2020010955A1 PCT/CN2019/089217 CN2019089217W WO2020010955A1 WO 2020010955 A1 WO2020010955 A1 WO 2020010955A1 CN 2019089217 W CN2019089217 W CN 2019089217W WO 2020010955 A1 WO2020010955 A1 WO 2020010955A1
Authority
WO
WIPO (PCT)
Prior art keywords
keyword
memory slot
vector
word
keyword memory
Prior art date
Application number
PCT/CN2019/089217
Other languages
French (fr)
Chinese (zh)
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 WO2020010955A1 publication Critical patent/WO2020010955A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking

Definitions

  • the present application relates to the technical field of natural language processing, and in particular to a keyword extraction method, computer equipment, and storage medium based on reinforcement learning.
  • the above-mentioned intelligent customer service robot is mainly a single round of question and answer, that is, the user asks a question, and the intelligent customer service robot returns a response to the user, and terminates the question and answer.
  • the intelligent customer service robot cannot prepare to grasp the context of the content and dialogue context, it often answers unanswered questions, which greatly reduces user satisfaction.
  • the following content is provided to help understand, using the encoding-decoding method, that is, the entire sentence above is encoded, and the following dialogue is decoded and stitched in the question below, as an additional input below.
  • a keyword extraction method based on reinforcement learning, a computer device, and a storage medium are provided.
  • a keyword extraction method based on reinforcement learning including:
  • Preprocess a corpus composed of multiple sets of dialog data
  • a computer device includes a memory and one or more processors.
  • Computer-readable instructions are stored in the memory.
  • the one or more processors execute the following steps:
  • Preprocess a corpus composed of multiple sets of dialog data
  • the keyword learning slot G L is updated multiple times by using a reinforcement learning model to obtain the keyword memory slot G ′ L.
  • the keyword memory slot G ′ L includes word vectors of a plurality of keywords extracted from the nth group of conversations.
  • a storage medium stores a computer program.
  • the computer program When the computer program is executed by a processor, the following operations are implemented:
  • FIG. 1 is an application environment diagram of a keyword extraction method based on reinforcement learning provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a keyword extraction method based on reinforcement learning provided by an embodiment of the present application.
  • FIG. 3 is a flowchart of a keyword extraction method based on reinforcement learning provided by another embodiment of the present application.
  • FIG. 4 is an internal structural diagram of a computer device in an embodiment of the present application.
  • the keyword extraction method based on reinforcement learning can be applied to the application environment shown in FIG. 1.
  • the computer device 11 preprocesses a corpus composed of multiple sets of conversation data; establishes a keyword memory slot G n for the n group conversations in the corpus, and the keyword memory slot G n is used to record multiple histories of the n group conversations Keyword word vector; initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and use the reinforcement learning model to perform multiple rounds of updating the keyword memory slot G L to obtain the keyword memory slot G ′ L , the keywords
  • the memory slot G ′ L includes word vectors of a plurality of keywords extracted from the n-th conversation.
  • the computer device 11 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, portable wearable devices, independent servers, or server clusters composed of multiple servers.
  • FIG. 2 is a flowchart of a keyword extraction method based on reinforcement learning provided by an embodiment of the present application.
  • the method in this embodiment includes:
  • S21 Preprocess a corpus composed of multiple sets of dialog data.
  • the corpus consists of multiple sets of high-frequency standard question-and-answer FAQ dialogue data.
  • the corpus is used as an interactive environment for reinforcement learning.
  • Preprocessing a corpus composed of multiple sets of dialog data including: establishing a correspondence table between word vectors and keywords and words, and performing vector transformation on all dialog questions and answers in the corpus according to the correspondence table between word vectors and keywords and words,
  • vector transformation is performed to obtain S i
  • standard answers corresponding to the i-th question are subjected to vector transformation to obtain Y i .
  • S22 Establish a keyword memory slot G n in the n-th group of conversations in the corpus.
  • the keyword memory slot G n is used to record word vectors of multiple historical keywords in the n-th group of conversations.
  • the keyword memory slot G' L includes a word vector of multiple keywords extracted from the nth group of conversations. .
  • the number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated by M rounds using a reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an output value of action a.
  • the value of the action of a current scan is determined whether the word as a keyword, comprising: an operation when a is 0, then the current scan as a key word is not C i; a is not 0 when the operation of the current scan word C i considered Image And update the keyword memory slot G L.
  • the current scan word C i is regarded as a keyword, and the keyword memory slot G L is updated, including:
  • the current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
  • the pre-processing operation is performed on the word vectors in the updated keyword memory slot G ′ L to obtain the keyword words.
  • the pre-processing operation includes: extracting the keyword words corresponding to the word vector according to the correspondence table between the word vectors and the keyword words; memory groove G 'L word vectors in trans to give a preprocessing operation after updating the keyword words, easy to visualize the art of extracting keywords based on keywords in the art can words verification and improvement of reinforcement learning model.
  • the keyword word vector in the keyword memory slot G ′ L is stitched into the next question of the nth group of dialogues to supplement the missing keyword information in the next question.
  • the memory slot G ' L stores the keywords of the nth group of conversations in the corpus. After the user asks a new question, the method adds the keywords in the memory slot G' L to the new question and brings them into the neural network model together, so that Output accurate answers to new questions.
  • question 1 is “I want to book a hotel, how do I do it?"
  • Question 2 is "how to charge?”
  • Table 1 [1,2,3,4,5,6,7]
  • the reinforcement learning model is used to update the keyword memory slot G L to the keyword memory slot G ′ L , and the keyword memory slot G ′ L is a word vector of keywords extracted from the n-th group of conversations.
  • the state s is taken as an input into the reinforcement learning model, and an output action a is obtained.
  • the action a is a positive integer with a value ranging from [0,5].
  • a 0, the current scanning word “I” is not a keyword; when a ⁇ 0, the current scanning word “I” is a keyword, and the current scanning word “I” is stored in the first position of the keyword memory slot G L k positions.
  • the above keyword extraction method based on reinforcement learning has no strict restrictions on the use scenario and specific conversation content, and no strict restrictions on the training process and parameter range of the reinforcement learning model, and the calculation method of the predicted answer includes, but is not limited to Neural network model.
  • the establishment of a keyword memory slot G n by the n-th group session corpus, the obtained keyword memory slot groove G L G n memory after initialization keyword, the keyword model using reinforcement learning and memory slot G L The keyword memory slot G ' L is obtained by performing multiple rounds of update.
  • the keyword memory slot G' L includes the keyword word vector extracted from the nth group of conversations, which effectively improves the accuracy of the standard question and answer response below, and can guarantee multiple rounds.
  • the dialogue continues to be effective, and the keywords above are explicitly extracted and stitched into the content below, so that technicians can see the keyword content intuitively, and it is easy to adjust the algorithm and model to output the most accurate keywords.
  • FIG. 3 is a flowchart of a keyword extraction method based on reinforcement learning provided by another embodiment of the present application.
  • the method for calculating the reward function R (s, a) in this embodiment includes:
  • S31 determining whether the current scan word C i is the end of a sentence the word, when the word is not the end of a sentence the operation proceeds to S32; if a word into the end of a sentence S33;
  • the vector [C i , G L ] is input to the neural network model, and the predicted answer vector P i is output according to the neural network model.
  • the neural network model is a traditional technology, for example, the convolutional neural network model published in the application publication number CN107562792A "A deep learning-based question answering matching method".
  • Large direction output, through the function of the reward function R (s, a), can make the reinforcement learning model filter out keywords that meet the requirements of the context, thereby improving the response accuracy of customer service robots.
  • the most accurate keywords are continuously sought and combined with the following to obtain the most accurate answer, thereby improving the intelligence of the customer service robot.
  • a computer device is provided.
  • the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 4.
  • the computer equipment includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus.
  • the processor of the computer device is used to provide computing 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 and a computer program.
  • the internal memory provides an environment for running the operating system and computer programs in a non-volatile storage medium.
  • 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 a processor to implement a keyword extraction method based on reinforcement learning.
  • the display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen
  • the input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the computer device casing. , Or an external keyboard, trackpad, or mouse.
  • FIG. 4 is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer equipment to which the scheme of the present application is applied.
  • the specific computer equipment may be Include more or fewer parts than shown in the figure, or combine certain parts, or have a different arrangement of parts.
  • a computer device includes a memory and one or more processors.
  • Computer-readable instructions are stored in the memory.
  • the one or more processors execute the following steps:
  • Preprocess a corpus composed of multiple sets of dialog data
  • the keyword learning slot G L is updated multiple times by using a reinforcement learning model to obtain the keyword memory slot G ′ L.
  • the keyword memory slot G ′ L includes word vectors of a plurality of keywords extracted from the nth group of conversations.
  • preprocessing the corpus composed of multiple sets of dialog data includes: establishing a correspondence table between word vectors and keywords, and performing question and answer sentences for all dialogues in the corpus according to the correspondence table between word vectors and keywords.
  • Vector transformation The i-th question in the nth group of dialogues is transformed into S i , and the standard answer corresponding to the i-th question is transformed into vectors to obtain Y i .
  • vector conversion is performed on the questions and answers of all dialogues in the corpus, including: using Word2Vec tools to convert the questions of all dialogues in the corpus and the standard answers corresponding to the questions into vector form.
  • the number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated by M rounds using a reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an output value of action a.
  • the value of the action of a current scan is determined whether the word as a keyword, comprising: an operation when a is 0, then the current scan as a key word is not C i; when the operation is not a 0, depending on the current scan word C i As keywords, and update the keyword memory slot G L.
  • the current scan word C i is regarded as a keyword
  • the keyword memory slot G L is updated, including:
  • the current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
  • calculating the reward function R (s, a) includes:
  • prediction answer vector P i is output according to the vector [S i , G L ], including:
  • the vector [C i , G L ] is input to the neural network model, and the predicted answer vector P i is output according to the neural network model.
  • the anti-preprocessing operation includes: extracting the keyword words corresponding to the word vector according to the correspondence table between the word vectors and the keyword words;
  • the keyword word vector in the keyword memory slot G ′ L is stitched into the next question of the nth group of dialogues to supplement the missing keyword information in the next question.
  • a storage medium is characterized in that the storage medium stores a computer program, and when the computer program is executed by a processor, the following operations are implemented:
  • Preprocess a corpus composed of multiple sets of dialog data
  • the keyword learning slot G L is updated multiple times by using a reinforcement learning model to obtain the keyword memory slot G ′ L.
  • the keyword memory slot G ′ L includes word vectors of a plurality of keywords extracted from the nth group of conversations.
  • preprocessing the corpus composed of multiple sets of dialog data includes: establishing a correspondence table between word vectors and keywords, and performing question and answer sentences for all dialogues in the corpus according to the correspondence table between word vectors and keywords.
  • Vector transformation The i-th question in the nth group of dialogues is transformed into S i , and the standard answer corresponding to the i-th question is transformed into vectors to obtain Y i .
  • vector conversion is performed on the questions and answers of all dialogues in the corpus, including: using Word2Vec tools to convert the questions of all dialogues in the corpus and the standard answers corresponding to the questions into a vector form.
  • the number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated by M rounds using a reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an output value of action a.
  • the value of the action of a current scan is determined whether the word as a keyword, comprising: an operation when a is 0, then the current scan as a key word is not C i; when the operation is not a 0, depending on the current scan word C i As keywords, and update the keyword memory slot G L.
  • the current scan word C i is regarded as a keyword
  • the keyword memory slot G L is updated, including:
  • the current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
  • calculating the reward function R (s, a) includes:
  • prediction answer vector P i is output according to the vector [S i , G L ], including:
  • the vector [C i , G L ] is input to the neural network model, and the predicted answer vector P i is output according to the neural network model.
  • Performing a pre-processing operation on the word vector in the updated keyword memory slot G ′ L to obtain a keyword word includes: extracting a keyword word corresponding to the word vector according to a correspondence table between the word vector and the keyword word;
  • the keyword word vector in the keyword memory slot G ′ L is stitched into the next question of the nth group of dialogues to supplement the missing keyword information in the next question.
  • any process or method description in a flowchart or otherwise described herein can be understood as representing a module, fragment, or portion of code that includes one or more executable instructions for implementing the operation of a particular logical function or process
  • the scope of the preferred embodiments of the present application includes additional implementations, in which the functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved, which should It is understood by those skilled in the art to which the embodiments of the present application pertain. It should be understood that each part of the application may be implemented by hardware, software, firmware, or a combination thereof.
  • a plurality of operations or methods may be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.
  • Discrete logic circuits Discrete logic circuits, application specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
  • each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist separately physically, or two or more units may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
  • the aforementioned storage medium may be a read-only memory, a magnetic disk, or an optical disk.

Landscapes

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

Abstract

A keyword extraction method based on reinforcement learning, the method comprising: establishing a keyword memory slot Gn for an nth group of dialogs in a corpus; initializing the keyword memory slot Gn and then obtaining a keyword memory slot GL; and updating the keyword memory slot GL in multiple rounds by using a reinforcement learning model, so as to obtain a keyword memory slot G'L, wherein the keyword memory slot G'L comprises a word vector of a keyword extracted from the nth group of dialogs.

Description

基于强化学习的关键词抽取方法、计算机设备和存储介质Keyword extraction method based on reinforcement learning, computer equipment and storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2018年7月13日提交中国专利局、申请号为201810774634.0、发明名称为“基于强化学习的关键词抽取方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed on July 13, 2018 with the Chinese Patent Office, application number 201810774634.0, and the invention name is "Keyword Extraction Method Based on Reinforcement Learning", the entire contents of which are incorporated herein by reference in.
技术领域Technical field
本申请涉及自然语言处理技术领域,尤其是一种基于强化学习的关键词抽取方法、计算机设备和存储介质。The present application relates to the technical field of natural language processing, and in particular to a keyword extraction method, computer equipment, and storage medium based on reinforcement learning.
背景技术Background technique
随着互联网企业的用户增多,人工客服由于繁忙不能及时回复用户问题导致用户对企业印象降低,因此智能机器人应运而生。相关技术中,智能机器人的工作方法为:首先是对用户高频、意图明确的热门问题进行分析,抽象成若干类标准问句(Frequently Asked Questions,简称FAQ),对每一个FAQ由专业的业务人员标记好标准答案,然后针对未来用户的问题,采用技术手段分析该问题是否能够匹配到任何一个已有的FAQ,当成功匹配则将预先标记好的答案返回给用户从而,达到高效地解决用户疑问的效果。但上述智能客服机器人主要为单轮问答,即用户提出一个问题,由智能客服机器人返回给用户一个回答,并终止该问答。而当用户基于上一问答语境继续提问时,由于智能客服机器人无法准备把握上下文内容对话语境,因此常常答非所问,使得用户满意度大大降低,相关技术中,为使智能客服机器人结合上下文情境,在对话中为下文提供额外帮助理解的内容,采用编码-解码的方式,即将上文中整句话进行编码,并在下文的对话中进行解码拼接在下文问句内,作为下文的额外输入。但这种方式无法显式的保存上文对话信息,且将经过编码的上文内容直接拼接到下文中,不仅不能有效提取关键词信息,还会造成数据冗余,不利于在下文对话内容中进行明确的指代消解,对下文问答的 辅助作用较小,因此,亟需一种新型的可保障多轮对话持续有效进行的技术方案来解决这一问题。With the increase of users in Internet companies, artificial customer service has reduced the user's impression of the company due to busy users' inability to respond to user questions in a timely manner, so intelligent robots have emerged at the historic moment. In related technology, the working method of intelligent robots is as follows: firstly, analyze hot topics with high frequency and clear intentions of users, and abstract them into several types of standard questions (FAQs); for each FAQ, a professional business The person marks the standard answer, and then uses technical means to analyze whether the question can match any existing FAQ for the question of the future user. When the match is successful, the pre-marked answer is returned to the user to efficiently solve the user. Questioning effect. However, the above-mentioned intelligent customer service robot is mainly a single round of question and answer, that is, the user asks a question, and the intelligent customer service robot returns a response to the user, and terminates the question and answer. When the user continues to ask questions based on the previous Q & A context, because the intelligent customer service robot cannot prepare to grasp the context of the content and dialogue context, it often answers unanswered questions, which greatly reduces user satisfaction. In related technologies, in order to integrate intelligent customer service robots with contextual situations, In the dialogue, the following content is provided to help understand, using the encoding-decoding method, that is, the entire sentence above is encoded, and the following dialogue is decoded and stitched in the question below, as an additional input below. However, this method cannot explicitly save the above dialogue information, and the coded above content is directly stitched into the following, which not only cannot effectively extract the keyword information, but also causes data redundancy, which is not conducive to the following dialogue content. Clearly referring to the resolution, the auxiliary role of the question and answer below is relatively small. Therefore, a new technical solution that can ensure the continuous and effective conduct of multiple rounds of dialogue is urgently needed to solve this problem.
发明内容Summary of the invention
根据本申请的各个实施例,提供一种基于强化学习的关键词抽取方法、计算机设备和存储介质。According to various embodiments of the present application, a keyword extraction method based on reinforcement learning, a computer device, and a storage medium are provided.
一种基于强化学习的关键词抽取方法,包括:A keyword extraction method based on reinforcement learning, including:
将多组对话数据组成的语料库进行预处理;Preprocess a corpus composed of multiple sets of dialog data;
将所述语料库中第n组对话建立一个关键词记忆槽G n,所述关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量; Establish a keyword memory slot G n for the n-th group of conversations in the corpus, where the keyword memory slot G n is used to record word vectors of multiple historical keywords of the n-th group of conversations;
将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及 Initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and
利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,所述关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 Use a reinforcement learning model to perform multiple rounds of update on the keyword memory slot G L to obtain a keyword memory slot G ′ L , where the keyword memory slot G ′ L includes a word vector of a plurality of keywords extracted from the n-th group of conversations .
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the one or more processors execute the following steps:
将多组对话数据组成的语料库进行预处理;Preprocess a corpus composed of multiple sets of dialog data;
将语料库中第n组对话建立一个关键词记忆槽G n,关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量; Establish a keyword memory slot G n for the nth group of dialogs in the corpus, and the keyword memory slot G n is used to record the word vectors of multiple historical keywords of the nth group of dialogs;
将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及 Initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and
利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 The keyword learning slot G L is updated multiple times by using a reinforcement learning model to obtain the keyword memory slot G ′ L. The keyword memory slot G ′ L includes word vectors of a plurality of keywords extracted from the nth group of conversations.
一种存储介质,存储介质存储有计算机程序,计算机程序被处理器执行时,实现以下操作:A storage medium stores a computer program. When the computer program is executed by a processor, the following operations are implemented:
将多组对话数据组成的语料库进行预处理;Preprocess a corpus composed of multiple sets of dialog data;
将所述语料库中第n组对话建立一个关键词记忆槽G n,所述关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量; Establish a keyword memory slot G n for the n-th group of conversations in the corpus, where the keyword memory slot G n is used to record word vectors of multiple historical keywords of the n-th group of conversations;
将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及 Initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and
利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,所述关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 Use a reinforcement learning model to perform multiple rounds of update on the keyword memory slot G L to obtain a keyword memory slot G ′ L , where the keyword memory slot G ′ L includes a word vector of a plurality of keywords extracted from the n-th group of conversations .
本发明的一个或多个实施例的细节在下面的附图和描述中提出。本发明的其它特征、目的和优点将从说明书、附图以及权利要求书变得明显。Details of one or more embodiments of the invention are set forth in the accompanying drawings and description below. Other features, objects, and advantages of the invention will be apparent from the description, the drawings, and the claims.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本申请。It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and should not limit the present application.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本申请的实施例,并与说明书一起用于解释本申请的原理。The drawings herein are incorporated in and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the description serve to explain the principles of the application.
为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions in the embodiments of the present application or the prior art more clearly, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without paying creative work.
图1是本申请一个实施例提供的基于强化学习的关键词抽取方法的应用环境图。FIG. 1 is an application environment diagram of a keyword extraction method based on reinforcement learning provided by an embodiment of the present application.
图2是本申请一个实施例提供的基于强化学习的关键词抽取方法的流程图。FIG. 2 is a flowchart of a keyword extraction method based on reinforcement learning provided by an embodiment of the present application.
图3是本申请另一个实施例提供的基于强化学习的关键词抽取方法的流程图。FIG. 3 is a flowchart of a keyword extraction method based on reinforcement learning provided by another embodiment of the present application.
图4是本申请一个实施例中计算机设备的内部结构图。FIG. 4 is an internal structural diagram of a computer device in an embodiment of the present application.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solution, and advantages of the present application clearer, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
本申请实施例提供的基于强化学习的关键词抽取方法,可以应用于如图1所示的应用环境中。其中,计算机设备11将多组对话数据组成的语料库进行预处理;将语料库中第n组对话建立一个关键词记忆槽G n,关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量;将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。其中,计算机设备11可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑、便携式可穿戴设备、独立的服务器或者是多个服务器组成的服务器集群等。 The keyword extraction method based on reinforcement learning provided in the embodiment of the present application can be applied to the application environment shown in FIG. 1. Among them, the computer device 11 preprocesses a corpus composed of multiple sets of conversation data; establishes a keyword memory slot G n for the n group conversations in the corpus, and the keyword memory slot G n is used to record multiple histories of the n group conversations Keyword word vector; initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and use the reinforcement learning model to perform multiple rounds of updating the keyword memory slot G L to obtain the keyword memory slot G ′ L , the keywords The memory slot G ′ L includes word vectors of a plurality of keywords extracted from the n-th conversation. The computer device 11 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, portable wearable devices, independent servers, or server clusters composed of multiple servers.
图2是本申请一个实施例提供的基于强化学习的关键词抽取方法的流程图。FIG. 2 is a flowchart of a keyword extraction method based on reinforcement learning provided by an embodiment of the present application.
如图2所示,本实施例的方法包括:As shown in FIG. 2, the method in this embodiment includes:
S21:将多组对话数据组成的语料库进行预处理。S21: Preprocess a corpus composed of multiple sets of dialog data.
语料库由多组高频标准问答FAQ的对话数据组成,将语料库作为强化学习的交互环境。The corpus consists of multiple sets of high-frequency standard question-and-answer FAQ dialogue data. The corpus is used as an interactive environment for reinforcement learning.
将多组对话数据组成的语料库进行预处理,包括:建立词向量与关键词词语对应关系表,依照词向量与关键词词语对应关系表对语料库中所有对话的问句和答句进行向量转化,第n组对话中第i个问句进行向量转化得到S i,与第i个问句对应的标准答句进行向量转化得到Y iPreprocessing a corpus composed of multiple sets of dialog data, including: establishing a correspondence table between word vectors and keywords and words, and performing vector transformation on all dialog questions and answers in the corpus according to the correspondence table between word vectors and keywords and words, In the nth group of dialogues, vector transformation is performed to obtain S i , and standard answers corresponding to the i-th question are subjected to vector transformation to obtain Y i .
对语料库中所有对话的问句和答句进行向量转化,包括:使用Word2Vec工具将语料库中所有对话的问句和标准答句转化为向量形式。Word2Vec是Google开源的一款用于词向量计算的工具。Vector conversion of all dialog questions and answers in the corpus, including: using Word2Vec tools to convert all dialog questions and standard answers in the corpus into vector form. Word2Vec is a Google open source tool for word vector calculation.
S22:将语料库中第n组对话建立一个关键词记忆槽G n,关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量。 S22: Establish a keyword memory slot G n in the n-th group of conversations in the corpus. The keyword memory slot G n is used to record word vectors of multiple historical keywords in the n-th group of conversations.
S23:将关键词记忆槽G n进行初始化得到关键词记忆槽G LS23: Initialize the keyword memory slot G n to obtain a keyword memory slot G L.
将关键词记忆槽G n进行初始化得到关键词记忆槽G L,包括:对关键词记忆槽G n进行长度初始化和向量初始化,长度初始化包括将关键词记忆槽G n的长度设置为L,向量初始化包括将关键词记忆槽G n中向量设置为0,得到关键词记忆槽G L=[0,0,...,0],例如L=5,则G L=[0,0,0,0,0]。 The keyword memory is initialized to obtain grooves G n Image Memory groove G L, comprising: a memory for keywords grooves G n and the length initialization vector initialization, including initialization of the length of the longitudinal groove G n arranged keyword memory is L, the vector Initialization includes setting the vector in the keyword memory slot G n to 0 to obtain the keyword memory slot G L = [0,0, ..., 0], for example, L = 5, then G L = [0,0,0 , 0,0].
S24:利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 S24: Use the reinforcement learning model to perform multiple rounds of update on the keyword memory slot G L to obtain the keyword memory slot G ' L. The keyword memory slot G' L includes a word vector of multiple keywords extracted from the nth group of conversations. .
利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,包括: Use the reinforcement learning model to perform multiple rounds of update on the keyword memory slot G L to obtain the keyword memory slot G ' L , including:
从句首到句尾依次扫描第n组对话中当前问句S i中的每个词,并以当前扫描词C i和第n组对话的当前关键词记忆槽G L的拼接向量作为状态s,即s=[C i,G L]; The first clause sequentially scanned to the end of each word in the sentence S i n-th group session in the current question and the current scan and the n-th word C i of the current keyword group session groove G L splicing memory as the state vector s, That is, s = [C i , G L ];
将状态s作为输入带入强化学习模型中,得到输出动作a,动作a为取值范围在[0,L]的正整数;Take the state s as input into the reinforcement learning model and get the output action a, which is a positive integer with a value ranging from [0, L];
将状态转移概率P(s'|s,a)设置为1,以使状态s每次执行动作a后都能发生状态迁移得到新状态s’;Set the state transition probability P (s '| s, a) to 1, so that each time state s performs an action a, a state transition occurs to obtain a new state s';
根据动作a的值判断当前扫描词是否为关键词;Determine whether the current scanned word is a keyword according to the value of action a;
计算奖励函数R(s,a);Calculate the reward function R (s, a);
根据奖励函数R(s,a)值确定下一次训练时动作a的输出值;Determine the output value of action a in the next training according to the value of the reward function R (s, a);
将强化学习训练次数设置为M次,即利用强化学习模型对关键词记忆槽G L进行M轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括动作a的输出值。 The number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated by M rounds using a reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an output value of action a.
根据动作a的值判断当前扫描词是否为关键词,包括:当动作a为0,则 当前扫描词C i不为关键词;当动作a不为0,将当前扫描词C i视为关键词,并更新关键词记忆槽G LThe value of the action of a current scan is determined whether the word as a keyword, comprising: an operation when a is 0, then the current scan as a key word is not C i; a is not 0 when the operation of the current scan word C i considered Image And update the keyword memory slot G L.
将当前扫描词C i视为关键词,并更新关键词记忆槽G L,包括: The current scan word C i is regarded as a keyword, and the keyword memory slot G L is updated, including:
将当前扫描词C i存储到关键词记忆槽G L的第k个位置上,k为动作a输出的的值。 The current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
将更新后关键词记忆槽G' L中词向量进行反预处理操作得到关键词词语,反预处理操作包括:依据词向量与关键词词语的对应关系表提取词向量对应的关键词词;将更新后记忆槽G' L中词向量进行反预处理操作得到关键词词语,方便技术人员直观查看抽取的关键词,技术人员可以根据关键词词语验证和改进强化学习模型。 The pre-processing operation is performed on the word vectors in the updated keyword memory slot G ′ L to obtain the keyword words. The pre-processing operation includes: extracting the keyword words corresponding to the word vector according to the correspondence table between the word vectors and the keyword words; memory groove G 'L word vectors in trans to give a preprocessing operation after updating the keyword words, easy to visualize the art of extracting keywords based on keywords in the art can words verification and improvement of reinforcement learning model.
或者,将关键词记忆槽G' L中的关键词词向量拼接到第n组对话的下一问句中,补充下一问句中缺失的关键词信息。 Alternatively, the keyword word vector in the keyword memory slot G ′ L is stitched into the next question of the nth group of dialogues to supplement the missing keyword information in the next question.
记忆槽G' L中存储了语料库中第n组对话的关键词,在用户提出新的问题后,方法将记忆槽G' L中关键词附加在新的问题后一起带入神经网络模型,从而输出新问题的准确答句。 The memory slot G ' L stores the keywords of the nth group of conversations in the corpus. After the user asks a new question, the method adds the keywords in the memory slot G' L to the new question and brings them into the neural network model together, so that Output accurate answers to new questions.
例如,用户提问1为“我想预定酒店,该如何操作?”,提问2为“如何收费?”,方法首先将每个问题进行预处理操作,例如提问1为“我想预定酒店,如何操作?”经过预处理后得到向量S 1=[1,2,3,4,5,6,7],词向量与关键词词语的对应关系表如表1所示。 For example, user question 1 is "I want to book a hotel, how do I do it?", Question 2 is "how to charge?" The method first preprocesses each question, for example, question 1 is "I want to book a hotel, how do I do it?" ? "After preprocessing, the vector S 1 = [1,2,3,4,5,6,7] is obtained. The correspondence between the word vector and the keywords is shown in Table 1.
表1Table 1
问句关键词词语Question, keywords, word 问句关键词向量Question Keyword Vector
I 11
miss you 22
预定Book 33
酒店Hotel 44
The 55
如何how is it 66
操作operating 77
提问2“如何收费?”转换为向量为S 2=[6,8]。在强化学习模型训练集中将给出S 1的标准答句Y 1,S 2的标准答句Y 2,Y 1、Y 2具体内容不再赘述。 Question 2 "How to charge?" The vector is converted to S 2 = [6,8]. In reinforcement learning model will be given a training set of standard S 1 A sentence of Y 1, S 2 A standard sentence Y 2, Y 1, Y 2 details will not be repeated.
为提问1和提问2这组对话建立一个关键词记忆槽G n,关键词记忆槽G n用于记录提问1的关键词; Establish a keyword memory slot G n for the dialogues of Question 1 and Question 2; the keyword memory slot G n is used to record the keywords of Question 1;
将关键词记忆槽G n进行初始化得到G L,设定L=5,则G L初始化为[0,0,0,0,0]; Initialize the keyword memory slot G n to obtain G L , and set L = 5, then G L is initialized to [0,0,0,0,0];
利用强化学习模型将关键词记忆槽G L更新为关键词记忆槽G' L,关键词记忆槽G' L中为从第n组对话中抽取的关键词的词向量。 The reinforcement learning model is used to update the keyword memory slot G L to the keyword memory slot G ′ L , and the keyword memory slot G ′ L is a word vector of keywords extracted from the n-th group of conversations.
从句首到句尾依次扫描对话中当前问句S 1中的每个词,并以当前扫描词例如为“我”,转化为词向量后为[1]和对话的当前关键词记忆槽G L的拼接向量作为状态s,即s=[1,0,0,0,0,0]; Scan each word in the current question S 1 in the conversation in turn from the beginning to the end of the sentence, and use the current scan word, such as "I", to convert it into a word vector and then [1] and the current keyword memory slot G L As the state s, that is, s = [1,0,0,0,0,0];
将状态s作为输入带入强化学习模型中,得到输出动作a,动作a为取值范围在[0,5]的正整数。当a=0,则当前扫描词“我”不是关键词;当a≠0,则当前扫描词“我”是关键词,并将当前扫描词“我”存储到关键词记忆槽G L的第k个位置上。k为动作a输出的的值,例如为k=5,则更新为关键词记忆槽G' L=[0,0,0,0,1]。因为当前扫描词“我”不是句尾词,奖励函数R(s,a)为0,继续扫描下一词“想”。因为状态转移概率P(s'|s,a)为1,则得到新状态s’=[2,0,0,0,0,1]。由新状态s’得到的新动作a’,当a’=3,当前关键词记忆槽更新为[0,0,2,0,1]。依次扫描提问1句的所有词语,直到当前扫描词为句尾词“操作”,计算奖励函数R(s,a),根据奖励函数R(s,a)不断修正动作a的输出。 The state s is taken as an input into the reinforcement learning model, and an output action a is obtained. The action a is a positive integer with a value ranging from [0,5]. When a = 0, the current scanning word “I” is not a keyword; when a ≠ 0, the current scanning word “I” is a keyword, and the current scanning word “I” is stored in the first position of the keyword memory slot G L k positions. k is the value output by action a. For example, if k = 5, it is updated to the keyword memory slot G ′ L = [0,0,0,0,1]. Because the currently scanned word "I" is not the end of the sentence, the reward function R (s, a) is 0, and the next word "think" is scanned. Because the state transition probability P (s '| s, a) is 1, we get a new state s' = [2,0,0,0,0,1]. The new action a 'obtained from the new state s'. When a' = 3, the current keyword memory slot is updated to [0,0,2,0,1]. Scan all the words in question 1 in turn until the current scanned word is the word "operation" at the end of the sentence, calculate the reward function R (s, a), and continuously modify the output of action a according to the reward function R (s, a).
重复上述过程M次后,设定M=100,使得最终输出关键词记忆槽G' L=[6,4,1,2,3]结果为将关键词“酒店”带入提问2中,通过神经网络模型后 输出预测答句与训练集中标注答句Y 2误差最小,以保障多轮对话持续有效进行。 After repeating the above process M times, set M = 100, so that the keyword memory slot G ' L = [6,4,1,2,3] is finally output. The neural network model outputs the predicted answer and the labeled answer Y 2 in the training set with the smallest error to ensure continuous and effective multi-round dialogue.
可以理解的是,上述基于强化学习的关键词抽取方法对使用场景与具体对话内容无严格限制,以及对强化学习模型的训练过程和参数范围无严格限制以及对预测回答的计算方法包括但不限于神经网络模型。It can be understood that the above keyword extraction method based on reinforcement learning has no strict restrictions on the use scenario and specific conversation content, and no strict restrictions on the training process and parameter range of the reinforcement learning model, and the calculation method of the predicted answer includes, but is not limited to Neural network model.
本实施例中,通过将语料库中第n组对话建立一个关键词记忆槽G n,将关键词记忆槽G n初始化后得到关键词记忆槽G L,利用强化学习模型将关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括第n组对话中抽取出关键词词向量,有效提高了下文的标准问答回复准确率,并且可保障多轮对话持续有效进行,并且,显式抽取上文关键词并拼接到下文内容中,可使技术人员直观看到关键词内容,便于对算法和模型进行调整,以输出最准确的关键词。 In this embodiment, the establishment of a keyword memory slot G n by the n-th group session corpus, the obtained keyword memory slot groove G L G n memory after initialization keyword, the keyword model using reinforcement learning and memory slot G L The keyword memory slot G ' L is obtained by performing multiple rounds of update. The keyword memory slot G' L includes the keyword word vector extracted from the nth group of conversations, which effectively improves the accuracy of the standard question and answer response below, and can guarantee multiple rounds. The dialogue continues to be effective, and the keywords above are explicitly extracted and stitched into the content below, so that technicians can see the keyword content intuitively, and it is easy to adjust the algorithm and model to output the most accurate keywords.
图3是本申请另一个实施例提供的基于强化学习的关键词抽取方法的流程图。FIG. 3 is a flowchart of a keyword extraction method based on reinforcement learning provided by another embodiment of the present application.
如图3所示,本实施例在上一实施例基础上,计算奖励函数R(s,a)的方法包括:As shown in FIG. 3, based on the previous embodiment, the method for calculating the reward function R (s, a) in this embodiment includes:
S31:判断当前扫描词C i是否为句尾词,当不是句尾词进入操作S32;当是句尾词进入S33; S31: determining whether the current scan word C i is the end of a sentence the word, when the word is not the end of a sentence the operation proceeds to S32; if a word into the end of a sentence S33;
S32:当当前扫描词C i不是句尾词,奖励函数R(s,a)为0; S32: When the current scan word C i is not the end of a sentence, the reward function R (s, a) is 0;
S33:当当前扫描词C i是句尾词,则将当前问句S i与第n组对话的当前关键词记忆槽G L进行向量拼接得到[C i,G L]; S33: When the current scan word C i is a sentence ending word, vector stitching is performed between the current question S i and the current keyword memory slot G L of the n-th dialog to obtain [C i , G L ];
S34:根据向量[C i,G L]输出预测回答向量P iS34: Output a predicted answer vector P i according to the vector [C i , G L ];
将向量[C i,G L]输入神经网络模型,根据神经网络模型输出预测回答向量P i。神经网络模型为传统技术,例如为申请公布号为CN107562792A《一种基于深度学习的问答匹配方法》中公布的卷积神经网络模型。 The vector [C i , G L ] is input to the neural network model, and the predicted answer vector P i is output according to the neural network model. The neural network model is a traditional technology, for example, the convolutional neural network model published in the application publication number CN107562792A "A deep learning-based question answering matching method".
S35:计算预测回答向量P i和标准答句Y i的平方误差的负数作为奖励函数R(s,a),即R(s,a)=-(P i-Y i) 2S35: calculating a predicted vector P i and the standard answer sentence A negative Y i squared error function as a reward R (s, a), i.e., R (s, a) = - (P i -Y i) 2.
奖励函数R(s,a)值越大,说明输出的动作越满足状态的要求,即输出的关键词向量越准确,在下一次训练中,动作a会趋向于奖励函数R(s,a)值大的方向输出,通过奖励函数R(s,a)的作用,可以使强化学习模型筛选出满足上下文语境要求的关键词,从而提高客服机器人回复准确率。The larger the value of the reward function R (s, a), the more the output actions meet the state requirements, that is, the more accurate the output keyword vector, in the next training, the action a will tend to the value of the reward function R (s, a) Large direction output, through the function of the reward function R (s, a), can make the reinforcement learning model filter out keywords that meet the requirements of the context, thereby improving the response accuracy of customer service robots.
本实施例中,通过对强化学习模型中参数的选取与调整,不断寻求最准确的关键词与下文进行结合以得到最准确答句,从而提高客服机器人智能性。In this embodiment, through the selection and adjustment of parameters in the reinforcement learning model, the most accurate keywords are continuously sought and combined with the following to obtain the most accurate answer, thereby improving the intelligence of the customer service robot.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图4所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于强化学习的关键词抽取方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 4. The computer equipment includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. The processor of the computer device is used to provide computing 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 and a computer program. The internal memory provides an environment for running the operating system and computer programs in a non-volatile storage medium. 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 a processor to implement a keyword extraction method based on reinforcement learning. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a button, a trackball or a touchpad provided on the computer device casing. , Or an external keyboard, trackpad, or mouse.
本领域技术人员可以理解,图4中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 4 is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer equipment to which the scheme of the present application is applied. The specific computer equipment may be Include more or fewer parts than shown in the figure, or combine certain parts, or have a different arrangement of parts.
一种计算机设备,包括存储器和一个或多个处理器,存储器中储存有计算机可读指令,计算机可读指令被处理器执行时,使得一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. Computer-readable instructions are stored in the memory. When the computer-readable instructions are executed by the processor, the one or more processors execute the following steps:
将多组对话数据组成的语料库进行预处理;Preprocess a corpus composed of multiple sets of dialog data;
将语料库中第n组对话建立一个关键词记忆槽G n,关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量; Establish a keyword memory slot G n for the nth group of dialogs in the corpus, and the keyword memory slot G n is used to record the word vectors of multiple historical keywords of the nth group of dialogs;
将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及 Initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and
利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 The keyword learning slot G L is updated multiple times by using a reinforcement learning model to obtain the keyword memory slot G ′ L. The keyword memory slot G ′ L includes word vectors of a plurality of keywords extracted from the nth group of conversations.
进一步的,将多组对话数据组成的语料库进行预处理,包括:建立词向量与关键词词语对应关系表,依照词向量与关键词词语对应关系表对语料库中所有对话的问句和答句进行向量转化,第n组对话中第i个问句进行向量转化得到S i,与第i个问句对应的标准答句进行向量转化得到Y iFurther, preprocessing the corpus composed of multiple sets of dialog data includes: establishing a correspondence table between word vectors and keywords, and performing question and answer sentences for all dialogues in the corpus according to the correspondence table between word vectors and keywords. Vector transformation. The i-th question in the nth group of dialogues is transformed into S i , and the standard answer corresponding to the i-th question is transformed into vectors to obtain Y i .
进一步的,对语料库中所有对话的问句和答句进行向量转化,包括:使用Word2Vec工具将语料库中所有对话的问句和与问句对应的标准答句转化为向量形式。Further, vector conversion is performed on the questions and answers of all dialogues in the corpus, including: using Word2Vec tools to convert the questions of all dialogues in the corpus and the standard answers corresponding to the questions into vector form.
进一步的,将关键词记忆槽G n进行初始化得到关键词记忆槽G L,包括:对关键词记忆槽G n进行长度初始化和向量初始化,长度初始化包括将关键词记忆槽G n的长度设置为L,向量初始化包括将关键词记忆槽G n中向量设置为0,得到关键词记忆槽G L=[0,0,...,0]。 Further, the keyword memory is initialized to obtain grooves G n Image Memory groove G L, comprising: a memory for keywords grooves G n and the length initialization vector initialization, including initialization of the length of the keyword memory slot length is set to G n L, vector initialization includes setting the vector in the keyword memory slot G n to 0, and obtaining the keyword memory slot G L = [0,0, ..., 0].
进一步的,利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,包括: Further, using the reinforcement learning model to perform multiple rounds of updating the keyword memory slot G L to obtain the keyword memory slot G ′ L includes:
从句首到句尾依次扫描第n组对话中当前问句S i中的每个词,并以当前扫描词C i和第n组对话的当前关键词记忆槽G L的拼接向量作为状态s,即s=[C i,G L]; The first clause sequentially scanned to the end of each word in the sentence S i n-th group session in the current question and the current scan and the n-th word C i of the current keyword group session groove G L splicing memory as the state vector s, That is, s = [C i , G L ];
将状态s作为输入带入强化学习模型中,得到输出动作a,动作a为取值范围在[0,L]的正整数;Take the state s as input into the reinforcement learning model and get the output action a, which is a positive integer with a value ranging from [0, L];
将状态转移概率P(s'|s,a)设置为1,以使状态s每次执行动作a后都能发 生状态迁移得到新状态s’;Set the state transition probability P (s '| s, a) to 1, so that each time state s performs action a, a state transition can occur to obtain a new state s';
根据动作a的值判断当前扫描词是否为关键词;Determine whether the current scanned word is a keyword according to the value of action a;
计算奖励函数R(s,a);Calculate the reward function R (s, a);
根据奖励函数R(s,a)值确定下一次训练时动作a的输出值;及Determine the output value of action a at the next training based on the value of the reward function R (s, a); and
将强化学习训练次数设置为M次,即利用强化学习模型对关键词记忆槽G L进行M轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括动作a的输出值。 The number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated by M rounds using a reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an output value of action a.
进一步的,根据动作a的值判断当前扫描词是否为关键词,包括:当动作a为0,则当前扫描词C i不为关键词;当动作a不为0,将当前扫描词C i视为关键词,并更新关键词记忆槽G LFurther, according to the value of the action of a current scan is determined whether the word as a keyword, comprising: an operation when a is 0, then the current scan as a key word is not C i; when the operation is not a 0, depending on the current scan word C i As keywords, and update the keyword memory slot G L.
进一步的,将当前扫描词C i视为关键词,并更新关键词记忆槽G L,包括: Further, the current scan word C i is regarded as a keyword, and the keyword memory slot G L is updated, including:
将当前扫描词C i存储到关键词记忆槽G L的第k个位置上,k为动作a输出的的值。 The current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
进一步的,计算奖励函数R(s,a),包括:Further, calculating the reward function R (s, a) includes:
当当前扫描词C i是句尾词,则将当前问句S i与第n组对话的当前关键词记忆槽G L进行向量拼接得到[C i,G L]; When the current scanning word C i is a sentence ending word, vector stitching is performed between the current question S i and the current keyword memory slot G L of the nth group of dialogs to obtain [C i , G L ];
根据向量[C i,G L]输出预测回答向量P iOutput a predictive answer vector P i according to the vector [C i , G L ];
计算预测回答向量P i和标准答句Y i的平方误差的负数作为奖励函数R(s,a),即R(s,a)=-(P i-Y i) 2;及 Calculating a predicted vector P i and answers A negative square error standard sentence Y i as a reward function R (s, a), i.e., R (s, a) = - (P i -Y i) 2; and
当当前扫描词C i不是句尾词,奖励函数R(s,a)为0。 When the current scan word C i is not the end of a sentence, the reward function R (s, a) is 0.
进一步的,根据向量[S i,G L]输出预测回答向量P i,包括: Further, the prediction answer vector P i is output according to the vector [S i , G L ], including:
将向量[C i,G L]输入神经网络模型,根据神经网络模型输出预测回答向量P iThe vector [C i , G L ] is input to the neural network model, and the predicted answer vector P i is output according to the neural network model.
进一步的,还包括:Further, it also includes:
将更新后关键词记忆槽G' L中词向量进行反预处理操作得到关键词词语, 反预处理操作包括:依据词向量与关键词词语的对应关系表提取词向量对应的关键词词; Performing a pre-processing operation on the word vectors in the updated keyword memory slot G ′ L to obtain keyword words. The anti-preprocessing operation includes: extracting the keyword words corresponding to the word vector according to the correspondence table between the word vectors and the keyword words;
或者,将关键词记忆槽G' L中的关键词词向量拼接到第n组对话的下一问句中,以补充下一问句中缺失的关键词信息。 Alternatively, the keyword word vector in the keyword memory slot G ′ L is stitched into the next question of the nth group of dialogues to supplement the missing keyword information in the next question.
一种存储介质,其特征在于,存储介质存储有计算机程序,计算机程序被处理器执行时,实现以下操作:A storage medium is characterized in that the storage medium stores a computer program, and when the computer program is executed by a processor, the following operations are implemented:
将多组对话数据组成的语料库进行预处理;Preprocess a corpus composed of multiple sets of dialog data;
将语料库中第n组对话建立一个关键词记忆槽G n,关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量; Establish a keyword memory slot G n for the nth group of dialogs in the corpus, and the keyword memory slot G n is used to record the word vectors of multiple historical keywords of the nth group of dialogs;
将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及 Initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and
利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 The keyword learning slot G L is updated multiple times by using a reinforcement learning model to obtain the keyword memory slot G ′ L. The keyword memory slot G ′ L includes word vectors of a plurality of keywords extracted from the nth group of conversations.
进一步的,将多组对话数据组成的语料库进行预处理,包括:建立词向量与关键词词语对应关系表,依照词向量与关键词词语对应关系表对语料库中所有对话的问句和答句进行向量转化,第n组对话中第i个问句进行向量转化得到S i,与第i个问句对应的标准答句进行向量转化得到Y iFurther, preprocessing the corpus composed of multiple sets of dialog data includes: establishing a correspondence table between word vectors and keywords, and performing question and answer sentences for all dialogues in the corpus according to the correspondence table between word vectors and keywords. Vector transformation. The i-th question in the nth group of dialogues is transformed into S i , and the standard answer corresponding to the i-th question is transformed into vectors to obtain Y i .
进一步的,对语料库中所有对话的问句和答句进行向量转化,包括:使用Word2Vec工具将语料库中所有对话的问句和与问句对应的标准答句转化为向量形式。Further, vector conversion is performed on the questions and answers of all dialogues in the corpus, including: using Word2Vec tools to convert the questions of all dialogues in the corpus and the standard answers corresponding to the questions into a vector form.
进一步的,将关键词记忆槽G n进行初始化得到关键词记忆槽G L,包括:对关键词记忆槽G n进行长度初始化和向量初始化,长度初始化包括将关键词记忆槽G n的长度设置为L,向量初始化包括将关键词记忆槽G n中向量设置为0,得到关键词记忆槽G L=[0,0,...,0]。 Further, the keyword memory is initialized to obtain grooves G n Image Memory groove G L, comprising: a memory for keywords grooves G n and the length initialization vector initialization, including initialization of the length of the keyword memory slot length is set to G n L, vector initialization includes setting the vector in the keyword memory slot G n to 0, and obtaining the keyword memory slot G L = [0,0, ..., 0].
进一步的,利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,包括: Further, using the reinforcement learning model to perform multiple rounds of updating the keyword memory slot G L to obtain the keyword memory slot G ′ L includes:
从句首到句尾依次扫描第n组对话中当前问句S i中的每个词,并以当前扫描词C i和第n组对话的当前关键词记忆槽G L的拼接向量作为状态s,即s=[C i,G L]; The first clause sequentially scanned to the end of each word in the sentence S i n-th group session in the current question and the current scan and the n-th word C i of the current keyword group session groove G L splicing memory as the state vector s, That is, s = [C i , G L ];
将状态s作为输入带入强化学习模型中,得到输出动作a,动作a为取值范围在[0,L]的正整数;Take the state s as input into the reinforcement learning model and get the output action a, which is a positive integer with a value ranging from [0, L];
将状态转移概率P(s'|s,a)设置为1,以使状态s每次执行动作a后都能发生状态迁移得到新状态s’;Set the state transition probability P (s '| s, a) to 1, so that each time state s performs an action a, a state transition occurs to obtain a new state s';
根据动作a的值判断当前扫描词是否为关键词;Determine whether the current scanned word is a keyword according to the value of action a;
计算奖励函数R(s,a);Calculate the reward function R (s, a);
根据奖励函数R(s,a)值确定下一次训练时动作a的输出值;及Determine the output value of action a at the next training based on the value of the reward function R (s, a); and
将强化学习训练次数设置为M次,即利用强化学习模型对关键词记忆槽G L进行M轮更新得到关键词记忆槽G' L,关键词记忆槽G' L中包括动作a的输出值。 The number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated by M rounds using a reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an output value of action a.
进一步的,根据动作a的值判断当前扫描词是否为关键词,包括:当动作a为0,则当前扫描词C i不为关键词;当动作a不为0,将当前扫描词C i视为关键词,并更新关键词记忆槽G LFurther, according to the value of the action of a current scan is determined whether the word as a keyword, comprising: an operation when a is 0, then the current scan as a key word is not C i; when the operation is not a 0, depending on the current scan word C i As keywords, and update the keyword memory slot G L.
进一步的,将当前扫描词C i视为关键词,并更新关键词记忆槽G L,包括: Further, the current scan word C i is regarded as a keyword, and the keyword memory slot G L is updated, including:
将当前扫描词C i存储到关键词记忆槽G L的第k个位置上,k为动作a输出的的值。 The current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
进一步的,计算奖励函数R(s,a),包括:Further, calculating the reward function R (s, a) includes:
当当前扫描词C i是句尾词,则将当前问句S i与第n组对话的当前关键词记忆槽G L进行向量拼接得到[C i,G L]; When the current scanning word C i is a sentence ending word, vector stitching is performed between the current question S i and the current keyword memory slot G L of the nth group of dialogs to obtain [C i , G L ];
根据向量[C i,G L]输出预测回答向量P iOutput a predictive answer vector P i according to the vector [C i , G L ];
计算预测回答向量P i和标准答句Y i的平方误差的负数作为奖励函数R(s,a),即R(s,a)=-(P i-Y i) 2;及 Calculating a predicted vector P i and answers A negative square error standard sentence Y i as a reward function R (s, a), i.e., R (s, a) = - (P i -Y i) 2; and
当当前扫描词C i不是句尾词,奖励函数R(s,a)为0。 When the current scan word C i is not the end of a sentence, the reward function R (s, a) is 0.
进一步的,根据向量[S i,G L]输出预测回答向量P i,包括: Further, the prediction answer vector P i is output according to the vector [S i , G L ], including:
将向量[C i,G L]输入神经网络模型,根据神经网络模型输出预测回答向量P iThe vector [C i , G L ] is input to the neural network model, and the predicted answer vector P i is output according to the neural network model.
进一步的,还包括:Further, it also includes:
将更新后关键词记忆槽G' L中词向量进行反预处理操作得到关键词词语,反预处理操作包括:依据词向量与关键词词语的对应关系表提取词向量对应的关键词词; Performing a pre-processing operation on the word vector in the updated keyword memory slot G ′ L to obtain a keyword word, and the anti-preprocessing operation includes: extracting a keyword word corresponding to the word vector according to a correspondence table between the word vector and the keyword word;
或者,将关键词记忆槽G' L中的关键词词向量拼接到第n组对话的下一问句中,以补充下一问句中缺失的关键词信息。 Alternatively, the keyword word vector in the keyword memory slot G ′ L is stitched into the next question of the nth group of dialogues to supplement the missing keyword information in the next question.
可以理解的是,上述各实施例中相同或相似部分可以相互参考,在一些实施例中未详细说明的内容可以参见其他实施例中相同或相似的内容。It can be understood that the same or similar parts in the above embodiments can be referred to each other. For the content that is not described in detail in some embodiments, refer to the same or similar content in other embodiments.
需要说明的是,在本申请的描述中,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性。此外,在本申请的描述中,除非另有说明,“多个”的含义是指至少两个。It should be noted that, in the description of the present application, the terms “first”, “second”, and the like are used for descriptive purposes only, and cannot be understood to indicate or imply relative importance. In addition, in the description of this application, unless otherwise stated, the meaning of "a plurality" means at least two.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的操作的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施例所属技术领域的技术人员所理解。应当理解,本申请的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个操作或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。例如,如果用硬件来实现,和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列 (PGA),现场可编程门阵列(FPGA)等。Any process or method description in a flowchart or otherwise described herein can be understood as representing a module, fragment, or portion of code that includes one or more executable instructions for implementing the operation of a particular logical function or process And, the scope of the preferred embodiments of the present application includes additional implementations, in which the functions may be performed out of the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order according to the functions involved, which should It is understood by those skilled in the art to which the embodiments of the present application pertain. It should be understood that each part of the application may be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, a plurality of operations or methods may be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it may be implemented using any one or a combination of the following techniques known in the art: Discrete logic circuits, application specific integrated circuits with suitable combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.
本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分操作是可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的操作之一或其组合。Those of ordinary skill in the art may understand that all or part of the operations carried by the methods in the foregoing embodiments may be implemented by a program instructing related hardware. The program may be stored in a computer-readable storage medium. When the program is executed, Including one of the operations of the method embodiments or a combination thereof.
此外,在本申请各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present application may be integrated into one processing module, or each unit may exist separately physically, or two or more units may be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
上述提到的存储介质可以是只读存储器,磁盘或光盘等。The aforementioned storage medium may be a read-only memory, a magnetic disk, or an optical disk.
在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, the description with reference to the terms “one embodiment”, “some embodiments”, “examples”, “specific examples”, or “some examples” and the like means specific features described in conjunction with the embodiments or examples , Structure, materials, or features are included in at least one embodiment or example of the present application. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
尽管上面已经示出和描述了本申请的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施例进行变化、修改、替换和变型。Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limitations on the present application. Those skilled in the art can interpret the above within the scope of the present application. Embodiments are subject to change, modification, substitution, and modification.
需要说明的是,本发明不局限于上述最佳实施方式,本领域技术人员在本发明的启示下都可得出其他各种形式的产品,但不论在其形状或结构上作任何变化,凡是具有与本申请相同或相近似的技术方案,均落在本发明的保护范围之内。It should be noted that the present invention is not limited to the above-mentioned best embodiment. Those skilled in the art can derive other various forms of products under the inspiration of the present invention, but regardless of any change in shape or structure, any Technical solutions having the same or similar technical solutions as the present application all fall within the protection scope of the present invention.

Claims (30)

  1. 一种基于强化学习的关键词抽取方法,包括:A keyword extraction method based on reinforcement learning, including:
    将多组对话数据组成的语料库进行预处理;Preprocess a corpus composed of multiple sets of dialog data;
    将所述语料库中第n组对话建立一个关键词记忆槽G n,所述关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量; Establish a keyword memory slot G n for the n-th group of conversations in the corpus, where the keyword memory slot G n is used to record word vectors of multiple historical keywords of the n-th group of conversations;
    将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及 Initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and
    利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,所述关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 Use a reinforcement learning model to perform multiple rounds of update on the keyword memory slot G L to obtain a keyword memory slot G ′ L , where the keyword memory slot G ′ L includes a word vector of a plurality of keywords extracted from the n-th group of conversations .
  2. 根据权利要求1所述的方法,其特征在于,所述将多组对话数据组成的语料库进行预处理,包括:建立词向量与关键词词语对应关系表,依照所述词向量与关键词词语对应关系表对所述语料库中所有对话的问句和答句进行向量转化,第n组对话中第i个问句进行向量转化得到S i,与第i个问句对应的标准答句进行向量转化得到Y iThe method according to claim 1, wherein the preprocessing the corpus composed of a plurality of sets of dialog data comprises: establishing a correspondence table between a word vector and a keyword word, and corresponding to the keyword word according to the word vector Relation table performs vector transformation on all dialog questions and answers in the corpus, vector transformation of the i-th question in the nth group of dialogues to obtain S i , and vector transformation of standard answers corresponding to the i-th question obtain Y i.
  3. 根据权利要求2所述的方法,其特征在于,所述对所述语料库中所有对话的问句和答句进行向量转化,包括:使用Word2Vec工具将所述语料库中所有对话的问句和与问句对应的标准答句转化为向量形式。The method according to claim 2, wherein performing vector conversion on the questions and answers of all conversations in the corpus comprises: using Word2Vec tool to convert the questions and answers of all conversations in the corpus. The standard answer sentence corresponding to the sentence is converted into vector form.
  4. 根据权利要求1所述的方法,其特征在于,所述将关键词记忆槽G n进行初始化得到关键词记忆槽G L,包括:对关键词记忆槽G n进行长度初始化和向量初始化,所述长度初始化包括将所述关键词记忆槽G n的长度设置为L,所述向量初始化包括将所述关键词记忆槽G n中向量设置为0,得到关键词记忆槽G L=[0,0,...,0]。 The method according to claim 1, wherein the initializing the keyword memory slot G n to obtain the keyword memory slot G L comprises: performing a length initialization and a vector initialization of the keyword memory slot G n . The length initialization includes setting the length of the keyword memory slot G n to L, and the vector initialization includes setting the vector in the keyword memory slot G n to 0 to obtain the keyword memory slot G L = [0,0 , ..., 0].
  5. 根据权利要求1所述的方法,其特征在于,所述利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,包括: The method according to claim 1, wherein the step of updating the keyword memory slot G L by using a reinforcement learning model to obtain the keyword memory slot G ' L comprises:
    从句首到句尾依次扫描第n组对话中当前问句S i中的每个词,并以当前扫描词C i和所述第n组对话的当前关键词记忆槽G L的拼接向量作为状态s,即 s=[C i,G L]; Each word in the current question S i in the n-th group of dialogues is scanned sequentially from the beginning to the end of the sentence, and the stitching vector of the current scan word C i and the current keyword memory slot G L of the n-th group of dialogues is used as the state s, that is, s = [C i , G L ];
    将状态s作为输入带入强化学习模型中,得到输出动作a,所述动作a为取值范围在[0,L]的正整数;Take state s as input into the reinforcement learning model to obtain output action a, where action a is a positive integer with a value in the range [0, L];
    将状态转移概率P(s'|s,a)设置为1,以使状态s每次执行动作a后都能发生状态迁移得到新状态s’;Set the state transition probability P (s '| s, a) to 1, so that each time state s performs an action a, a state transition occurs to obtain a new state s';
    根据动作a的值判断当前扫描词是否为关键词;Determine whether the current scanned word is a keyword according to the value of action a;
    计算奖励函数R(s,a);Calculate the reward function R (s, a);
    根据奖励函数R(s,a)值确定下一次训练时动作a的输出值;及Determine the output value of action a at the next training based on the value of the reward function R (s, a); and
    将强化学习训练次数设置为M次,即所述利用强化学习模型对关键词记忆槽G L进行M轮更新得到关键词记忆槽G' L,所述关键词记忆槽G' L中包括动作a的输出值。 The number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated in an M round by using the reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an action a Output value.
  6. 根据权利要求5所述的方法,其特征在于,所述根据动作a的值判断当前扫描词是否为关键词,包括:当动作a为0,则当前扫描词C i不为关键词;当动作a不为0,将当前扫描词C i视为关键词,并更新关键词记忆槽G LThe method according to claim 5, wherein said operation based on the value of a current scan is determined whether the word as a keyword, comprising: an operation when a is 0, then the current scan as a key word is not C i; when the operation a is not 0, the current scan word C i is regarded as a keyword, and the keyword memory slot G L is updated.
  7. 根据权利要求6所述的方法,其特征在于,所述将当前扫描词C i视为关键词,并更新关键词记忆槽G L,包括: The method according to claim 6, wherein said current scan word C i regarded as keywords, and updates the keyword memory slot G L, comprising:
    将当前扫描词C i存储到关键词记忆槽G L的第k个位置上,所述k为动作a输出的的值。 The current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
  8. 根据权利要求5所述的方法,其特征在于,所述计算奖励函数R(s,a),包括:The method according to claim 5, wherein the calculating the reward function R (s, a) comprises:
    当当前扫描词C i是句尾词,则将当前问句S i与第n组对话的当前关键词记忆槽G L进行向量拼接得到[C i,G L]; When the current scanning word C i is a sentence ending word, vector stitching is performed between the current question S i and the current keyword memory slot G L of the nth group of dialogs to obtain [C i , G L ];
    根据所述向量[C i,G L]输出预测回答向量P iOutput a predicted answer vector P i according to the vector [C i , G L ];
    计算预测回答向量P i和标准答句Y i的平方误差的负数作为奖励函数R(s,a),即R(s,a)=-(P i-Y i) 2;及 Calculating a predicted vector P i and answers A negative square error standard sentence Y i as a reward function R (s, a), i.e., R (s, a) = - (P i -Y i) 2; and
    当当前扫描词C i不是句尾词,奖励函数R(s,a)为0。 When the current scan word C i is not the end of a sentence, the reward function R (s, a) is 0.
  9. 根据权利要求8所述的方法,其特征在于,所述根据所述向量[S i,G L]输出预测回答向量P i,包括: The method according to claim 8, wherein the outputting a predicted answer vector P i according to the vector [S i , G L ] comprises:
    将所述向量[C i,G L]输入神经网络模型,根据所述神经网络模型输出预测回答向量P iThe vector [C i , G L ] is input to a neural network model, and a predicted answer vector P i is output according to the neural network model.
  10. 根据权利要求1或2任一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 or 2, further comprising:
    将更新后关键词记忆槽G' L中词向量进行反预处理操作得到关键词词语,所述反预处理操作包括:依据词向量与关键词词语的对应关系表提取词向量对应的关键词词; After updating the keyword memory groove G 'L in the anti-pre-word vectors obtained in keyword words, the inverse preprocessing operation comprises: extracting a keyword word vectors corresponding word according to the corresponding keyword table word vector words ;
    或者,将所述关键词记忆槽G' L中的关键词词向量拼接到所述第n组对话的下一问句中,以补充所述下一问句中缺失的关键词信息。 Alternatively, the keyword word vectors in the keyword memory slot G ′ L are stitched into the next question of the n-th group of dialogues to supplement the missing keyword information in the next question.
  11. 一种计算机设备,包括存储器和一个或多个处理器,所述存储器中储存有计算机可读指令,所述计算机可读指令被所述处理器执行时,使得所述一个或多个处理器执行以下步骤:A computer device includes a memory and one or more processors. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the one or more processors are executed. The following steps:
    将多组对话数据组成的语料库进行预处理;Preprocess a corpus composed of multiple sets of dialog data;
    将所述语料库中第n组对话建立一个关键词记忆槽G n,所述关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量; Establish a keyword memory slot G n for the n-th group of conversations in the corpus, where the keyword memory slot G n is used to record word vectors of multiple historical keywords of the n-th group of conversations;
    将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及 Initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and
    利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,所述关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 Use a reinforcement learning model to perform multiple rounds of update on the keyword memory slot G L to obtain a keyword memory slot G ′ L , where the keyword memory slot G ′ L includes a word vector of a plurality of keywords extracted from the n-th group of conversations .
  12. 根据权利要求11所述的计算机设备,其特征在于,所述将多组对话数据组成的语料库进行预处理,包括:建立词向量与关键词词语对应关系表,依照所述词向量与关键词词语对应关系表对所述语料库中所有对话的问句和答句进行向量转化,第n组对话中第i个问句进行向量转化得到S i,与第i个问句对应的标准答句进行向量转化得到Y iThe computer device according to claim 11, wherein the preprocessing of a corpus composed of a plurality of sets of dialog data comprises: establishing a correspondence table between word vectors and keyword words, and according to the word vectors and keyword words Correspondence table for vector transformation of all dialog questions and answers in the corpus, vector transformation of the i-th question in the nth group of dialogues to obtain S i , and vectoring of standard answers corresponding to the i-th question converted to Y i.
  13. 根据权利要求12所述的计算机设备,其特征在于,所述对所述语料库中所有对话的问句和答句进行向量转化,包括:使用Word2Vec工具将所述语料库中所有对话的问句和与问句对应的标准答句转化为向量形式。The computer device according to claim 12, characterized in that the vector transforming the questions and answers of all conversations in the corpus comprises: using Word2Vec tool to convert the questions and relations of all conversations in the corpus with The standard answer corresponding to the question is converted into vector form.
  14. 根据权利要求11所述的计算机设备,其特征在于,所述将关键词记忆槽G n进行初始化得到关键词记忆槽G L,包括:对关键词记忆槽G n进行长度初始化和向量初始化,所述长度初始化包括将所述关键词记忆槽G n的长度设置为L,所述向量初始化包括将所述关键词记忆槽G n中向量设置为0,得到关键词记忆槽G L=[0,0,...,0]。 The computer device according to claim 11, wherein the initializing the keyword memory slot G n to obtain the keyword memory slot G L comprises: performing a length initialization and a vector initialization of the keyword memory slot G n . The length initialization includes setting the length of the keyword memory slot G n to L, and the vector initialization includes setting the vector in the keyword memory slot G n to 0 to obtain the keyword memory slot G L = [0, 0, ..., 0].
  15. 根据权利要求11所述的计算机设备,其特征在于,所述利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,包括: The computer apparatus according to claim 11, wherein said reinforcement learning model using a keyword memory multiple rounds of grooves G L obtained keyword memory update groove G 'L, comprising:
    从句首到句尾依次扫描第n组对话中当前问句S i中的每个词,并以当前扫描词C i和所述第n组对话的当前关键词记忆槽G L的拼接向量作为状态s,即s=[C i,G L]; Each word in the current question S i in the n-th group of dialogues is scanned sequentially from the beginning to the end of the sentence, and the stitching vector of the current scan word C i and the current keyword memory slot G L of the n-th group of dialogues is used as the state s, that is, s = [C i , G L ];
    将状态s作为输入带入强化学习模型中,得到输出动作a,所述动作a为取值范围在[0,L]的正整数;Take state s as input into the reinforcement learning model to obtain output action a, where action a is a positive integer with a value in the range [0, L];
    将状态转移概率P(s'|s,a)设置为1,以使状态s每次执行动作a后都能发生状态迁移得到新状态s’;Set the state transition probability P (s '| s, a) to 1, so that each time state s performs an action a, a state transition occurs to obtain a new state s';
    根据动作a的值判断当前扫描词是否为关键词;Determine whether the current scanned word is a keyword according to the value of action a;
    计算奖励函数R(s,a);Calculate the reward function R (s, a);
    根据奖励函数R(s,a)值确定下一次训练时动作a的输出值;及Determine the output value of action a at the next training based on the value of the reward function R (s, a); and
    将强化学习训练次数设置为M次,即所述利用强化学习模型对关键词记忆槽G L进行M轮更新得到关键词记忆槽G' L,所述关键词记忆槽G' L中包括动作a的输出值。 The number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated in an M round by using the reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an action a Output value.
  16. 根据权利要求15所述的计算机设备,其特征在于,所述根据动作a的值判断当前扫描词是否为关键词,包括:当动作a为0,则当前扫描词C i不 为关键词;当动作a不为0,将当前扫描词C i视为关键词,并更新关键词记忆槽G LThe computer apparatus according to claim 15, wherein the determining whether the current scan word as a keyword, comprising the operation of a value: when the operation a is 0, C i is the current scan words as keywords not; if Action a is not 0, the current scan word C i is regarded as a keyword, and the keyword memory slot G L is updated.
  17. 根据权利要求16所述的计算机设备,其特征在于,所述将当前扫描词C i视为关键词,并更新关键词记忆槽G L,包括: The computer apparatus according to claim 16, wherein said current scan word C i regarded as keywords, and updates the keyword memory slot G L, comprising:
    将当前扫描词C i存储到关键词记忆槽G L的第k个位置上,所述k为动作a输出的的值。 The current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
  18. 根据权利要求15所述的计算机设备,其特征在于,所述计算奖励函数R(s,a),包括:The computer device according to claim 15, wherein the calculating the reward function R (s, a) comprises:
    当当前扫描词C i是句尾词,则将当前问句S i与第n组对话的当前关键词记忆槽G L进行向量拼接得到[C i,G L]; When the current scanning word C i is a sentence ending word, vector stitching is performed between the current question S i and the current keyword memory slot G L of the nth group of dialogs to obtain [C i , G L ];
    根据所述向量[C i,G L]输出预测回答向量P iOutput a predicted answer vector P i according to the vector [C i , G L ];
    计算预测回答向量P i和标准答句Y i的平方误差的负数作为奖励函数R(s,a),即R(s,a)=-(P i-Y i) 2;及 Calculating a predicted vector P i and answers A negative square error standard sentence Y i as a reward function R (s, a), i.e., R (s, a) = - (P i -Y i) 2; and
    当当前扫描词C i不是句尾词,奖励函数R(s,a)为0。 When the current scan word C i is not the end of a sentence, the reward function R (s, a) is 0.
  19. 根据权利要求18所述的计算机设备,其特征在于,所述根据所述向量[S i,G L]输出预测回答向量P i,包括: The computer device according to claim 18, wherein the outputting a predicted answer vector P i according to the vector [S i , G L ] comprises:
    将所述向量[C i,G L]输入神经网络模型,根据所述神经网络模型输出预测回答向量P iThe vector [C i , G L ] is input to a neural network model, and a predicted answer vector P i is output according to the neural network model.
  20. 根据权利要求15或16所述的计算机设备,其特征在于,还包括:The computer device according to claim 15 or 16, further comprising:
    将更新后关键词记忆槽G' L中词向量进行反预处理操作得到关键词词语,所述反预处理操作包括:依据词向量与关键词词语的对应关系表提取词向量对应的关键词词; After updating the keyword memory groove G 'L in the anti-pre-word vectors obtained in keyword words, the inverse preprocessing operation comprises: extracting a keyword word vectors corresponding word according to the corresponding keyword table word vector words ;
    或者,将所述关键词记忆槽G' L中的关键词词向量拼接到所述第n组对话的下一问句中,以补充所述下一问句中缺失的关键词信息。 Alternatively, the keyword word vectors in the keyword memory slot G ′ L are stitched into the next question of the n-th group of dialogues to supplement the missing keyword information in the next question.
  21. 一种存储介质,所述存储介质存储有计算机程序,所述计算机程 序被处理器执行时,实现以下操作:A storage medium stores a computer program. When the computer program is executed by a processor, the following operations are implemented:
    将多组对话数据组成的语料库进行预处理;Preprocess a corpus composed of multiple sets of dialog data;
    将所述语料库中第n组对话建立一个关键词记忆槽G n,所述关键词记忆槽G n用于记录第n组对话的多个历史关键词的词向量; Establish a keyword memory slot G n for the n-th group of conversations in the corpus, where the keyword memory slot G n is used to record word vectors of multiple historical keywords of the n-th group of conversations;
    将关键词记忆槽G n进行初始化得到关键词记忆槽G L;及 Initialize the keyword memory slot G n to obtain the keyword memory slot G L ; and
    利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,所述关键词记忆槽G' L中包括从第n组对话中抽取的多个关键词的词向量。 Use a reinforcement learning model to perform multiple rounds of update on the keyword memory slot G L to obtain a keyword memory slot G ′ L , where the keyword memory slot G ′ L includes a word vector of a plurality of keywords extracted from the n-th group of conversations .
  22. 根据权利要求21所述的存储介质,其特征在于,所述将多组对话数据组成的语料库进行预处理,包括:建立词向量与关键词词语对应关系表,依照所述词向量与关键词词语对应关系表对所述语料库中所有对话的问句和答句进行向量转化,第n组对话中第i个问句进行向量转化得到S i,与第i个问句对应的标准答句进行向量转化得到Y iThe storage medium according to claim 21, wherein the preprocessing the corpus composed of a plurality of sets of dialog data comprises: establishing a correspondence table between word vectors and keyword words, and according to the word vectors and keyword words Correspondence table for vector transformation of all dialog questions and answers in the corpus, vector transformation of the i-th question in the nth group of dialogues to obtain S i , and vectoring of standard answers corresponding to the i-th question converted to Y i.
  23. 根据权利要求22所述的存储介质,其特征在于,所述对所述语料库中所有对话的问句和答句进行向量转化,包括:使用Word2Vec工具将所述语料库中所有对话的问句和与问句对应的标准答句转化为向量形式。The storage medium according to claim 22, wherein performing vector transformation on the questions and answers of all conversations in the corpus comprises: using Word2Vec tool to convert the questions and relations of all conversations in the corpus with The standard answer corresponding to the question is converted into vector form.
  24. 根据权利要求21所述的存储介质,其特征在于,所述将关键词记忆槽G n进行初始化得到关键词记忆槽G L,包括:对关键词记忆槽G n进行长度初始化和向量初始化,所述长度初始化包括将所述关键词记忆槽G n的长度设置为L,所述向量初始化包括将所述关键词记忆槽G n中向量设置为0,得到关键词记忆槽G L=[0,0,...,0]。 The storage medium according to claim 21, wherein the initializing the keyword memory slot G n to obtain the keyword memory slot G L comprises: performing length initialization and vector initialization of the keyword memory slot G n , and The length initialization includes setting the length of the keyword memory slot G n to L, and the vector initialization includes setting the vector in the keyword memory slot G n to 0 to obtain the keyword memory slot G L = [0, 0, ..., 0].
  25. 根据权利要求21所述的存储介质,其特征在于,所述利用强化学习模型对关键词记忆槽G L进行多轮更新得到关键词记忆槽G' L,包括: The storage medium according to claim 21, wherein the step of updating the keyword memory slot G L by using a reinforcement learning model to obtain the keyword memory slot G ' L comprises:
    从句首到句尾依次扫描第n组对话中当前问句S i中的每个词,并以当前扫描词C i和所述第n组对话的当前关键词记忆槽G L的拼接向量作为状态s,即s=[C i,G L]; Each word in the current question S i in the n-th group of dialogues is scanned sequentially from the beginning to the end of the sentence, and the stitching vector of the current scan word C i and the current keyword memory slot G L of the n-th group of dialogues is used as the state s, that is, s = [C i , G L ];
    将状态s作为输入带入强化学习模型中,得到输出动作a,所述动作a为取值范围在[0,L]的正整数;Take state s as input into the reinforcement learning model to obtain output action a, where action a is a positive integer with a value in the range [0, L];
    将状态转移概率P(s'|s,a)设置为1,以使状态s每次执行动作a后都能发生状态迁移得到新状态s’;Set the state transition probability P (s '| s, a) to 1, so that each time state s performs an action a, a state transition occurs to obtain a new state s';
    根据动作a的值判断当前扫描词是否为关键词;Determine whether the current scanned word is a keyword according to the value of action a;
    计算奖励函数R(s,a);Calculate the reward function R (s, a);
    根据奖励函数R(s,a)值确定下一次训练时动作a的输出值;及Determine the output value of action a at the next training based on the value of the reward function R (s, a); and
    将强化学习训练次数设置为M次,即所述利用强化学习模型对关键词记忆槽G L进行M轮更新得到关键词记忆槽G' L,所述关键词记忆槽G' L中包括动作a的输出值。 The number of reinforcement learning training times is set to M, that is, the keyword memory slot G L is updated in an M round by using the reinforcement learning model to obtain the keyword memory slot G ′ L , and the keyword memory slot G ′ L includes an action a Output value.
  26. 根据权利要求25所述的存储介质,其特征在于,所述根据动作a的值判断当前扫描词是否为关键词,包括:当动作a为0,则当前扫描词C i不为关键词;当动作a不为0,将当前扫描词C i视为关键词,并更新关键词记忆槽G LThe storage medium according to claim 25, wherein the determining whether the current scan word as a keyword, comprising the operation of a value: when the operation a is 0, C i is the current scan words as keywords not; if Action a is not 0, the current scan word C i is regarded as a keyword, and the keyword memory slot G L is updated.
  27. 根据权利要求26所述的存储介质,其特征在于,所述将当前扫描词C i视为关键词,并更新关键词记忆槽G L,包括: The storage medium according to claim 26, wherein said current scan word C i regarded as keywords, and updates the keyword memory slot G L, comprising:
    将当前扫描词C i存储到关键词记忆槽G L的第k个位置上,所述k为动作a输出的的值。 The current scan word C i is stored in the k-th position of the keyword memory slot G L , where k is a value output by the action a.
  28. 根据权利要求25所述的存储介质,其特征在于,所述计算奖励函数R(s,a),包括:The storage medium according to claim 25, wherein the calculating the reward function R (s, a) comprises:
    当当前扫描词C i是句尾词,则将当前问句S i与第n组对话的当前关键词记忆槽G L进行向量拼接得到[C i,G L]; When the current scanning word C i is a sentence ending word, vector stitching is performed between the current question S i and the current keyword memory slot G L of the nth group of dialogs to obtain [C i , G L ];
    根据所述向量[C i,G L]输出预测回答向量P iOutput a predicted answer vector P i according to the vector [C i , G L ];
    计算预测回答向量P i和标准答句Y i的平方误差的负数作为奖励函数R(s,a),即R(s,a)=-(P i-Y i) 2;及 Calculating a predicted vector P i and answers A negative square error standard sentence Y i as a reward function R (s, a), i.e., R (s, a) = - (P i -Y i) 2; and
    当当前扫描词C i不是句尾词,奖励函数R(s,a)为0。 When the current scan word C i is not the end of a sentence, the reward function R (s, a) is 0.
  29. 根据权利要求28所述的存储介质,其特征在于,所述根据所述向量[S i,G L]输出预测回答向量P i,包括: The storage medium according to claim 28, wherein the outputting a predicted answer vector P i according to the vector [S i , G L ] comprises:
    将所述向量[C i,G L]输入神经网络模型,根据所述神经网络模型输出预测回答向量P iThe vector [C i , G L ] is input to a neural network model, and a predicted answer vector P i is output according to the neural network model.
  30. 根据权利要求25或26所述的存储介质,其特征在于,还包括:The storage medium according to claim 25 or 26, further comprising:
    将更新后关键词记忆槽G' L中词向量进行反预处理操作得到关键词词语,所述反预处理操作包括:依据词向量与关键词词语的对应关系表提取词向量对应的关键词词; After updating the keyword memory groove G 'L in the anti-pre-word vectors obtained in keyword words, the inverse preprocessing operation comprises: extracting a keyword word vectors corresponding word according to the corresponding keyword table word vector words ;
    或者,将所述关键词记忆槽G' L中的关键词词向量拼接到所述第n组对话的下一问句中,以补充所述下一问句中缺失的关键词信息。 Alternatively, the keyword word vectors in the keyword memory slot G ′ L are stitched into the next question of the n-th group of dialogues to supplement the missing keyword information in the next question.
PCT/CN2019/089217 2018-07-13 2019-05-30 Keyword extraction method based on reinforcement learning, and computer device and storage medium WO2020010955A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810774634.0 2018-07-13
CN201810774634.0A CN108897896B (en) 2018-07-13 2018-07-13 Keyword extraction method based on reinforcement learning

Publications (1)

Publication Number Publication Date
WO2020010955A1 true WO2020010955A1 (en) 2020-01-16

Family

ID=64349353

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/089217 WO2020010955A1 (en) 2018-07-13 2019-05-30 Keyword extraction method based on reinforcement learning, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN108897896B (en)
WO (1) WO2020010955A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108897896B (en) * 2018-07-13 2020-06-02 深圳追一科技有限公司 Keyword extraction method based on reinforcement learning
CN110008332B (en) * 2019-02-13 2020-11-10 创新先进技术有限公司 Method and device for extracting main words through reinforcement learning
CN110377713B (en) * 2019-07-16 2023-09-15 广州探域科技有限公司 Method for improving context of question-answering system based on probability transition
CN110427625B (en) * 2019-07-31 2022-12-27 腾讯科技(深圳)有限公司 Sentence completion method, apparatus, medium, and dialogue processing system
CN110569344B (en) * 2019-08-22 2023-06-02 创新先进技术有限公司 Method and device for determining standard question corresponding to dialogue text
CN111881267A (en) * 2020-05-25 2020-11-03 重庆兆光科技股份有限公司 Method, system, equipment and medium for extracting key sentences in dialogue corpus

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080260253A1 (en) * 2005-07-26 2008-10-23 Mitsuhiro Miyazaki Information Processing Apparatus, Feature Extraction Method, Recording Media, and Program
CN105930318A (en) * 2016-04-11 2016-09-07 深圳大学 Word vector training method and system
CN106095749A (en) * 2016-06-03 2016-11-09 杭州量知数据科技有限公司 A kind of text key word extracting method based on degree of depth study
CN106294322A (en) * 2016-08-04 2017-01-04 哈尔滨工业大学 A kind of Chinese based on LSTM zero reference resolution method
CN108897896A (en) * 2018-07-13 2018-11-27 深圳追科技有限公司 Keyword abstraction method based on intensified learning

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108090049B (en) * 2018-01-17 2021-02-05 山东工商学院 Multi-document abstract automatic extraction method and system based on sentence vectors

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080260253A1 (en) * 2005-07-26 2008-10-23 Mitsuhiro Miyazaki Information Processing Apparatus, Feature Extraction Method, Recording Media, and Program
CN105930318A (en) * 2016-04-11 2016-09-07 深圳大学 Word vector training method and system
CN106095749A (en) * 2016-06-03 2016-11-09 杭州量知数据科技有限公司 A kind of text key word extracting method based on degree of depth study
CN106294322A (en) * 2016-08-04 2017-01-04 哈尔滨工业大学 A kind of Chinese based on LSTM zero reference resolution method
CN108897896A (en) * 2018-07-13 2018-11-27 深圳追科技有限公司 Keyword abstraction method based on intensified learning

Also Published As

Publication number Publication date
CN108897896A (en) 2018-11-27
CN108897896B (en) 2020-06-02

Similar Documents

Publication Publication Date Title
WO2020010955A1 (en) Keyword extraction method based on reinforcement learning, and computer device and storage medium
US20220180202A1 (en) Text processing model training method, and text processing method and apparatus
EP3859735A2 (en) Voice conversion method, voice conversion apparatus, electronic device, and storage medium
US20210256390A1 (en) Computationally efficient neural network architecture search
US10395641B2 (en) Modifying a language conversation model
WO2021169745A1 (en) User intention recognition method and apparatus based on statement context relationship prediction
WO2020063148A1 (en) Deep learning-based entity extraction method, computer device and storage medium
WO2020073530A1 (en) Customer service robot session text classification method and apparatus, and electronic device and computer-readable storage medium
KR102541053B1 (en) Method, device, equipment and storage medium for acquiring word vector based on language model
CN111428516A (en) Information processing method and device
CN112214591B (en) Dialog prediction method and device
US20220293092A1 (en) Method and apparatus of training natural language processing model, and method and apparatus of processing natural language
WO2019154411A1 (en) Word vector retrofitting method and device
WO2020151310A1 (en) Text generation method and device, computer apparatus, and medium
US11321534B2 (en) Conversation space artifact generation using natural language processing, machine learning, and ontology-based techniques
EP4006909A1 (en) Method, apparatus and device for quality control and storage medium
Ling et al. Context-controlled topic-aware neural response generation for open-domain dialog systems
US20210248498A1 (en) Method and apparatus for training pre-trained knowledge model, and electronic device
WO2022253061A1 (en) Voice processing method and related device
WO2020124674A1 (en) Method and device for vectorizing translator's translation personality characteristics
KR20210106398A (en) Conversation-based recommending method, conversation-based recommending apparatus, and device
US20230023789A1 (en) Method for identifying noise samples, electronic device, and storage medium
US11080073B2 (en) Computerized task guidance across devices and applications
US20220238098A1 (en) Voice recognition method and device
CN116821457B (en) Intelligent consultation and public opinion processing system based on multi-mode large model

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.06.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19833407

Country of ref document: EP

Kind code of ref document: A1