CN110858226A - Dialogue management method and device - Google Patents
Dialogue management method and device Download PDFInfo
- Publication number
- CN110858226A CN110858226A CN201810893032.7A CN201810893032A CN110858226A CN 110858226 A CN110858226 A CN 110858226A CN 201810893032 A CN201810893032 A CN 201810893032A CN 110858226 A CN110858226 A CN 110858226A
- Authority
- CN
- China
- Prior art keywords
- input data
- user
- processed
- user input
- historical
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Machine Translation (AREA)
- User Interface Of Digital Computer (AREA)
Abstract
Description
技术领域technical field
本发明涉及计算机技术领域,尤其涉及一种对话管理方法和装置。The present invention relates to the field of computer technology, and in particular, to a dialog management method and device.
背景技术Background technique
近年来,随着人工智能的不断创新和进步,用户的购销商品、提供或接受服务以及从事其他经营活动方式也逐渐向人机交互的方式转变。在交互过程中,需要通过对话管理方法,根据用户的请求确定用户意图,然后将相应响应结果反馈给用户。因此,对话管理方法对人机交互过程起到至关重要的作用,它的好坏直接影响人机交互的效率以及用户的体验。In recent years, with the continuous innovation and progress of artificial intelligence, the way users buy and sell goods, provide or receive services, and engage in other business activities has gradually shifted to the way of human-computer interaction. In the interaction process, it is necessary to determine the user's intention according to the user's request through the dialog management method, and then feedback the corresponding response result to the user. Therefore, the dialogue management method plays a crucial role in the process of human-computer interaction, and its quality directly affects the efficiency of human-computer interaction and the user's experience.
现有技术对话管理方法是基于话术模板匹配的对话管理方法,具体解释为:预先写入匹配句式的程序代码,利用预先写入的程序代码对用户的输入请求进行匹配处理,然后根据匹配结果从后台数据库中获取机器人需要回复的语句,比如用户说“我要买手机”,机器就会反问“请问您要什么品牌的手机”。The prior art dialog management method is a dialog management method based on vocabulary template matching, which is specifically explained as follows: pre-writing program codes that match sentence patterns, using the pre-written program codes to perform matching processing on user input requests, and then according to the matching As a result, the sentence that the robot needs to reply is obtained from the background database. For example, if the user says "I want to buy a mobile phone", the machine will ask back "What brand of mobile phone do you want?".
在实现本发明过程中,发明人发现现有技术中至少存在如下问题:一、现有技术对话管理方法中,程序员需要开发更多的正则话术来匹配用户可能的输入信息,每当用户增加新的话术,后台服务器就需要重构程序,项目管理不够灵活;二、现有技术对话管理方法中,由于程序不可能事先把用户想说的所有语句都匹配好,会导致真实的线上业务出现匹配不到的情形。In the process of realizing the present invention, the inventor found that there are at least the following problems in the prior art: 1. In the prior art dialog management method, the programmer needs to develop more regular words to match the possible input information of the user. Adding new words, the backend server needs to refactor the program, and the project management is not flexible enough; 2. In the existing dialogue management method, because the program cannot match all the sentences the user wants to say in advance, it will lead to real online There is a situation where the business cannot be matched.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例提供一种对话管理方法和装置,能够减少大量正则程序的设计和维护成本,提高识别用户输入数据的准确性,提升用户体验。In view of this, the embodiments of the present invention provide a dialog management method and device, which can reduce the design and maintenance costs of a large number of regular programs, improve the accuracy of identifying user input data, and improve user experience.
为实现上述目的,根据本发明实施例的一个方面,提供了一种对话管理方法。To achieve the above object, according to an aspect of the embodiments of the present invention, a dialog management method is provided.
本发明实施例的一种对话管理方法,包括:根据自然语言理解模型对待处理用户输入数据进行处理,获取所述待处理用户输入数据的特征信息;确定所述待处理用户输入数据对应的历史记录信息,根据所述特征信息和所述历史记录信息,确定当前对话状态;根据所述当前对话状态,基于神经网络算法生成与所述待处理用户输入数据对应的响应数据。A dialog management method according to an embodiment of the present invention includes: processing user input data to be processed according to a natural language understanding model, acquiring feature information of the user input data to be processed; determining a history record corresponding to the user input data to be processed information, determine the current dialogue state according to the feature information and the history record information; and generate response data corresponding to the user input data to be processed based on the current dialogue state based on the neural network algorithm.
可选地,在根据自然语言理解模型对待处理用户输入数据进行分析之前,所述方法还包括:获取第一样本集,所述第一样本集包含至少一个用户输入样本数据;对所述用户输入样本数据进行标注处理,获取所述用户输入样本数据的特征信息,以生成第二样本集,所述第二样本集包含所述用户输入样本数据的特征信息;利用所述第一样本集和所述第二样本集构建训练样本集;对所述训练样本集进行训练,以得到所述自然语言理解模型,所述自然语言理解模型输入的是用户输入数据,输出的是用户输入数据的特征信息。Optionally, before analyzing the user input data to be processed according to the natural language understanding model, the method further includes: acquiring a first sample set, the first sample set including at least one user input sample data; The sample data input by the user is subjected to labeling processing, and the feature information of the sample data input by the user is obtained to generate a second sample set, and the second sample set includes the feature information of the sample data input by the user; using the first sample and the second sample set to construct a training sample set; the training sample set is trained to obtain the natural language understanding model, the input of the natural language understanding model is user input data, and the output is user input data characteristic information.
可选地,所述历史记录信息包括:用户历史输入数据、用户历史输入数据的特征信息、以及用户历史输入数据的对话状态,所述用户历史输入数据是所述待处理用户输入数据之前的预设n轮的用户输入数据,n为不小于零的整数。Optionally, the historical record information includes: user historical input data, feature information of the user historical input data, and a dialog state of the user historical input data, the user historical input data is the pre-processing before the user input data to be processed. Let n rounds of user input data, n be an integer not less than zero.
可选地,根据所述特征信息和所述历史记录信息确定当前对话状态包括:根据重叠度原则、场景分类原则或者模型相关性原则,判断所述待处理用户输入数据和所述用户历史输入数据是否相关;当所述待处理用户输入数据和所述用户历史输入数据相关时,根据所述用户历史输入数据的对话状态和所述待处理用户输入数据,更新所述当前对话状态;当所述待处理用户输入数据和所述用户历史输入数据不相关时,根据所述待处理用户输入数据生成新的对话状态,并将所述新的对话状态确定为所述当前对话状态。Optionally, determining the current dialogue state according to the feature information and the historical record information includes: judging the user input data to be processed and the user historical input data according to the overlapping degree principle, the scene classification principle or the model correlation principle. Whether it is related; when the user input data to be processed is related to the user historical input data, update the current dialog state according to the dialog state of the user historical input data and the user input data to be processed; When the user input data to be processed is not related to the historical user input data, a new dialog state is generated according to the user input data to be processed, and the new dialog state is determined as the current dialog state.
可选地,所述特征信息包括槽值信息;以及根据重叠度原则判断所述待处理用户输入数据和所述用户历史输入数据是否相关包括:计算所述待处理用户输入数据的槽值信息与所述用户历史输入数据的槽值信息的重叠度,并判断所述重叠度是否大于预设重叠度,若是,则确认所述待处理用户输入数据和所述用户历史输入数据相关。Optionally, the feature information includes slot value information; and judging whether the user input data to be processed and the user historical input data are related according to the overlapping degree principle includes: calculating the slot value information of the user input data to be processed and The overlap degree of the slot value information of the user historical input data is determined, and whether the overlap degree is greater than a preset overlap degree is determined. If so, it is confirmed that the user input data to be processed is related to the user historical input data.
可选地,所述特征信息包括场景信息;以及根据场景分类原则判断所述待处理用户输入数据和所述用户历史输入数据是否相关包括:判断所述待处理用户输入数据的场景信息和所述用户历史输入数据的场景信息是否相同,若是,则认为所述待处理用户输入数据的场景和所述用户历史输入数据的场景相同,并确认所述待处理用户输入数据和所述用户历史输入数据相关。Optionally, the feature information includes scene information; and judging whether the user input data to be processed and the user historical input data are related according to the scene classification principle includes: judging the scene information of the user input data to be processed and the user input data to be processed. Whether the scene information of the user's historical input data is the same, if so, consider that the scene of the user's input data to be processed is the same as the scene of the user's historical input data, and confirm that the user's input data to be processed and the user's historical input data are the same. related.
可选地,根据模型相关性原则判断所述待处理用户输入数据和所述用户历史输入数据是否相关包括:根据预先构建的上下文相关模型对所述待处理用户输入数据和所述用户历史输入数据进行相关性分析,若相关性分析结果是相关,则确认所述待处理用户输入数据和所述用户历史输入数据相关。Optionally, judging whether the to-be-processed user input data and the user historical input data are related according to the model correlation principle includes: comparing the to-be-processed user input data and the user historical input data according to a pre-built context-dependent model. A correlation analysis is performed, and if the correlation analysis result is related, it is confirmed that the user input data to be processed is related to the user historical input data.
可选地,在根据预先构建的上下文相关模型对所述待处理用户输入数据和所述用户历史输入数据进行相关性分析之前,所述方法还包括:基于动态记忆网络算法构建上下文相关模型。Optionally, before the correlation analysis is performed on the to-be-processed user input data and the user historical input data according to a pre-built context-dependent model, the method further includes: constructing a context-dependent model based on a dynamic memory network algorithm.
可选地,在根据重叠度原则、场景分类原则或者模型相关性原则,判断所述待处理用户输入数据和所述用户历史输入数据是否相关之后,所述方法还包括:利用神经网络门函数计算所述待处理用户输入数据的门权重;根据所述门权重,计算所述待处理用户输入数据和所述用户历史输入数据的相关度值;若所述相关度值大于预设相关度阈值,则确认所述待处理用户输入数据和所述用户历史输入数据相关。Optionally, after judging whether the user input data to be processed and the user historical input data are related according to the overlapping degree principle, the scene classification principle or the model correlation principle, the method further includes: calculating using a neural network gate function. The gate weight of the user input data to be processed; according to the gate weight, calculate the correlation value between the user input data to be processed and the user historical input data; if the correlation value is greater than the preset correlation threshold, Then, it is confirmed that the user input data to be processed is related to the user historical input data.
为实现上述目的,根据本发明实施例的另一方面,提供了一种对象管理装置。To achieve the above object, according to another aspect of the embodiments of the present invention, an object management apparatus is provided.
本发明实施例的一种对话管理装置,包括:获取模块,用于根据自然语言理解模型对待处理用户输入数据进行处理,获取所述待处理用户输入数据的特征信息;确定模块,用于确定所述待处理用户输入数据对应的历史记录信息,根据所述特征信息和所述历史记录信息,确定当前对话状态;生成模块,用于根据所述当前对话状态,基于神经网络算法生成与所述待处理用户输入数据对应的响应数据。A dialogue management device according to an embodiment of the present invention includes: an acquisition module, configured to process user input data to be processed according to a natural language understanding model, and acquire feature information of the to-be-processed user input data; a determination module, configured to determine all The historical record information corresponding to the user input data to be processed, according to the feature information and the historical record information, to determine the current dialogue state; the generating module is used for, according to the current dialogue state, based on the neural network algorithm. Process the response data corresponding to the user input data.
可选地,所述获取模块还用于:获取第一样本集,所述第一样本集包含至少一个用户输入样本数据;对所述用户输入样本数据进行标注处理,获取所述用户输入样本数据的特征信息,以生成第二样本集,所述第二样本集包含所述用户输入样本数据的特征信息;利用所述第一样本集和所述第二样本集构建训练样本集;对所述训练样本集进行训练,以得到所述自然语言理解模型,所述自然语言理解模型输入的是用户输入数据,输出的是用户输入数据的特征信息。Optionally, the obtaining module is further configured to: obtain a first sample set, where the first sample set includes at least one user input sample data; perform labeling processing on the user input sample data, and obtain the user input feature information of the sample data to generate a second sample set, the second sample set includes the feature information of the user input sample data; constructing a training sample set by using the first sample set and the second sample set; The training sample set is trained to obtain the natural language understanding model, where the input of the natural language understanding model is user input data, and the output is feature information of the user input data.
可选地,所述历史记录信息包括:用户历史输入数据、用户历史输入数据的特征信息、以及用户历史输入数据的对话状态,所述用户历史输入数据是所述待处理用户输入数据之前的预设n轮的用户输入数据,n为不小于零的整数。Optionally, the historical record information includes: user historical input data, feature information of the user historical input data, and a dialog state of the user historical input data, the user historical input data is the pre-processing before the user input data to be processed. Let n rounds of user input data, n be an integer not less than zero.
可选地,所述确定模块还用于:根据重叠度原则、场景分类原则或者模型相关性原则,判断所述待处理用户输入数据和所述用户历史输入数据是否相关;当所述待处理用户输入数据和所述用户历史输入数据相关时,根据所述用户历史输入数据的对话状态和所述待处理用户输入数据,更新所述当前对话状态;当所述待处理用户输入数据和所述用户历史输入数据不相关时,根据所述待处理用户输入数据生成新的对话状态,并将所述新的对话状态确定为所述当前对话状态。Optionally, the determining module is further configured to: according to the overlapping degree principle, the scene classification principle or the model correlation principle, determine whether the user input data to be processed and the user historical input data are related; When the input data is related to the user's historical input data, the current dialog state is updated according to the dialog state of the user's historical input data and the user input data to be processed; when the user input data to be processed is related to the user input data When the historical input data is irrelevant, a new dialog state is generated according to the user input data to be processed, and the new dialog state is determined as the current dialog state.
可选地,所述特征信息包括槽值信息;以及所述确定模块还用于:计算所述待处理用户输入数据的槽值信息与所述用户历史输入数据的槽值信息的重叠度,并判断所述重叠度是否大于预设重叠度,若是,则确认所述待处理用户输入数据和所述用户历史输入数据相关。Optionally, the feature information includes slot value information; and the determining module is further configured to: calculate the degree of overlap between the slot value information of the user input data to be processed and the slot value information of the user historical input data, and Determine whether the overlap degree is greater than a preset overlap degree, and if so, confirm that the user input data to be processed is related to the user historical input data.
可选地,所述特征信息包括场景信息;以及所述确定模块还用于:判断所述待处理用户输入数据的场景信息和所述用户历史输入数据的场景信息是否相同,若是,则认为所述待处理用户输入数据的场景和所述用户历史输入数据的场景相同,并确认所述待处理用户输入数据和所述用户历史输入数据相关。Optionally, the feature information includes scene information; and the determining module is further configured to: determine whether the scene information of the user input data to be processed is the same as the scene information of the user historical input data, and if so, it is considered that the scene information is the same. The scenario of the user input data to be processed is the same as the scenario of the user historical input data, and it is confirmed that the user input data to be processed is related to the user historical input data.
可选地,所述确定模块还用于:根据预先构建的上下文相关模型对所述待处理用户输入数据和所述用户历史输入数据进行相关性分析,若相关性分析结果是相关,则确认所述待处理用户输入数据和所述用户历史输入数据相关。Optionally, the determining module is further configured to: perform a correlation analysis on the user input data to be processed and the user historical input data according to a pre-built context-dependent model, and if the correlation analysis result is relevant, confirm all the relevant data. The user input data to be processed is related to the user historical input data.
可选地,所述确定模块还用于:基于动态记忆网络算法构建上下文相关模型。Optionally, the determining module is further configured to: construct a context-dependent model based on a dynamic memory network algorithm.
可选地,所述确定模块还用于:利用神经网络门函数计算所述待处理用户输入数据的门权重;根据所述门权重,计算所述待处理用户输入数据和所述用户历史输入数据的相关度值;若所述相关度值大于预设相关度阈值,则确认所述待处理用户输入数据和所述用户历史输入数据相关。Optionally, the determining module is further configured to: calculate the gate weight of the user input data to be processed by using a neural network gate function; calculate the user input data to be processed and the user historical input data according to the gate weight If the correlation value is greater than the preset correlation threshold, it is confirmed that the user input data to be processed is related to the user historical input data.
为实现上述目的,根据本发明实施例的再一方面,提供了一种电子设备。To achieve the above object, according to yet another aspect of the embodiments of the present invention, an electronic device is provided.
本发明实施例的一种电子设备包括:一个或多个处理器;存储装置,用于存储一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现本发明实施例的对话管理方法。An electronic device according to an embodiment of the present invention includes: one or more processors; and a storage device for storing one or more programs, and when the one or more programs are executed by the one or more processors, the one or more programs The processor implements the dialog management method of the embodiment of the present invention.
为实现上述目的,根据本发明实施例的又一方面,提供了一种计算机可读介质。To achieve the above object, according to yet another aspect of the embodiments of the present invention, a computer-readable medium is provided.
本发明实施例的一种计算机可读介质,其上存储有计算机程序,程序被处理器执行时实现本发明实施例的对话管理方法。A computer-readable medium of an embodiment of the present invention stores a computer program thereon, and when the program is executed by a processor, the dialog management method of the embodiment of the present invention is implemented.
上述发明中的一个实施例具有如下优点或有益效果:能够利用自然语言理解模型获取用户输入数据的特征信息,然后根据历史记录信息,确定当前对话状态,进而生成响应数据,从而可以减少大量正则程序的设计和维护成本,提高识别用户输入数据的准确性,提升用户体验;本发明实施例中对第一样本集和第二样本集组成的训练样本集进行训练,以获得自然语言理解模型,从而可以利用海量的样本集数据构建自然语言理解模型,提高了识别用户输入数据的准确性;本发明实施例中从重叠度原则、场景分类原则或者模型相关性原则多个角度判断待处理用户输入数据和用户历史输入数据的相关性,从而可以提高预测上下文关系的准确性,进一步提升用户体验;本发明实施例中根据槽值信息判断待处理用户输入数据和用户历史输入数据的重叠度,从而可以从输入数据的关键词的角度,预测上下文的相关性;本发明实施例中根据场景信息判断待处理用户输入数据和用户历史输入数据的相关性,从而可以根据输入数据的场景,预测上下文的相关性;本发明实施例中根据预构的上下文相关模型,判断待处理用户输入数据和用户历史输入数据的相关性,从而可以借助海量的数据生成的模型,对上下文的相关性进行预测;本发明实施例中还根据神经网络门函数计算待处理用户输入数据和用户历史输入数据的相关度值,从而可以提高预测上下文相关性的准确性。An embodiment of the above invention has the following advantages or beneficial effects: the natural language understanding model can be used to obtain the characteristic information of the user input data, and then the current dialogue state can be determined according to the historical record information, and then the response data can be generated, so that a large number of regular programs can be reduced. reduce the design and maintenance costs, improve the accuracy of identifying user input data, and improve user experience; in the embodiment of the present invention, the training sample set composed of the first sample set and the second sample set is trained to obtain a natural language understanding model, As a result, a natural language understanding model can be constructed by using massive sample set data, which improves the accuracy of identifying user input data; in the embodiment of the present invention, the user input to be processed is judged from multiple perspectives: the overlapping degree principle, the scene classification principle or the model correlation principle. The correlation between the data and the user's historical input data can improve the accuracy of the predicted context relationship and further improve the user experience; The relevance of the context can be predicted from the perspective of the keywords of the input data; in the embodiment of the present invention, the relevance of the user input data to be processed and the user historical input data is judged according to the scene information, so that the context can be predicted according to the scene of the input data. Correlation; in the embodiment of the present invention, the correlation between the user input data to be processed and the user historical input data is judged according to a pre-built context correlation model, so that the context correlation can be predicted with the help of a model generated by massive data; this In the embodiment of the invention, the correlation value between the user input data to be processed and the user historical input data is also calculated according to the neural network gate function, so that the accuracy of predicting the contextual correlation can be improved.
上述的非惯用的可选方式所具有的进一步效果将在下文中结合具体实施方式加以说明。Further effects of the above non-conventional alternatives will be described below in conjunction with specific embodiments.
附图说明Description of drawings
附图用于更好地理解本发明,不构成对本发明的不当限定。其中:The accompanying drawings are used for better understanding of the present invention and do not constitute an improper limitation of the present invention. in:
图1是根据本发明实施例的对话管理方法的主要步骤的示意图;1 is a schematic diagram of the main steps of a dialog management method according to an embodiment of the present invention;
图2是根据本发明实施例的手机品类下的槽值信息的示意图;2 is a schematic diagram of slot value information under a mobile phone category according to an embodiment of the present invention;
图3是根据本发明实施例的标注槽值信息的格式示意图;3 is a schematic diagram of a format for labeling slot value information according to an embodiment of the present invention;
图4是根据本发明一个可参考实施例的对话管理方法的主要流程的示意图;4 is a schematic diagram of the main flow of a dialog management method according to a referenced embodiment of the present invention;
图5是实现本发明对话管理方法的整体架构图;Fig. 5 is the overall structure diagram that realizes the dialogue management method of the present invention;
图6是根据本发明实施例的对话管理装置的主要模块的示意图;6 is a schematic diagram of the main modules of the dialog management apparatus according to an embodiment of the present invention;
图7是本发明实施例可以应用于其中的示例性系统架构图;FIG. 7 is an exemplary system architecture diagram to which an embodiment of the present invention may be applied;
图8是适于用来实现本发明实施例的终端设备或服务器的计算机系统的结构示意图。FIG. 8 is a schematic structural diagram of a computer system suitable for implementing a terminal device or a server according to an embodiment of the present invention.
具体实施方式Detailed ways
以下结合附图对本发明的示范性实施例做出说明,其中包括本发明实施例的各种细节以助于理解,应当将它们认为仅仅是示范性的。因此,本领域普通技术人员应当认识到,可以对这里描述的实施例做出各种改变和修改,而不会背离本发明的范围和精神。同样,为了清楚和简明,以下的描述中省略了对公知功能和结构的描述。Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, which include various details of the embodiments of the present invention to facilitate understanding and should be considered as exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted from the following description for clarity and conciseness.
图1是根据本发明实施例的对话管理方法的主要步骤的示意图。作为本发明的一个实施例,如图1所示,本发明实施例的对话管理方法的主要步骤可以包括:FIG. 1 is a schematic diagram of main steps of a dialog management method according to an embodiment of the present invention. As an embodiment of the present invention, as shown in FIG. 1 , the main steps of the dialog management method according to the embodiment of the present invention may include:
步骤S101:根据自然语言理解模型对待处理用户输入数据进行处理,获取待处理用户输入数据的特征信息。Step S101: Process the user input data to be processed according to the natural language understanding model, and acquire feature information of the user input data to be processed.
人机交互过程中,以一句用户输入数据与一句机器响应数据交替出现的形式进行。其中,用户输入数据可以是用户直接输入的文本数据,也可以是用户输入的语音数据。当用户输入数据是语音数据时,需要先用语音识别软件对语音数据进行识别,得到其对应的文本数据。响应数据是指机器反馈给用户的与用户输入数据对应的数据,可以是响应文本数据,也可以是响应语音数据。本发明中的机器可以是智能机器人,也可以是某购物应用上的智能导航客服,还可以是某电脑的智能客服软件,本发明对此不作限定。In the process of human-computer interaction, it is carried out in the form of a sentence of user input data and a sentence of machine response data. The user input data may be text data directly input by the user, or may be voice data input by the user. When the user input data is voice data, it is necessary to first identify the voice data with voice recognition software to obtain its corresponding text data. The response data refers to the data corresponding to the user input data fed back by the machine to the user, which may be response text data or response voice data. The machine in the present invention may be an intelligent robot, an intelligent navigation customer service on a shopping application, or an intelligent customer service software of a computer, which is not limited in the present invention.
一句用户输入数据及其对应的一句响应数据组成一轮对话数据。在人机交互过程中,可以包括单轮或多轮对话数据。本发明中,可以将每轮对话数据中的用户输入数据作为待处理用户输入数据。此步骤是将待处理用户输入数据作为预先构建的自然语言理解模型的输入,然后获取到待处理用户输入数据的特征信息。例如,用户输入“我要购买一台电脑”,获取到特征信息是“购买”和“电脑”。A sentence of user input data and its corresponding sentence of response data constitute a round of dialogue data. In the process of human-computer interaction, single or multiple rounds of dialogue data can be included. In the present invention, the user input data in each round of dialogue data can be regarded as the user input data to be processed. In this step, the user input data to be processed is used as the input of the pre-built natural language understanding model, and then the feature information of the user input data to be processed is obtained. For example, the user inputs "I want to buy a computer", and the acquired characteristic information is "purchase" and "computer".
作为本发明的又一个实施例,在步骤S101中根据自然语言理解模型对待处理用户输入数据进行分析之前,对话管理方法还可以包括:预先构建自然语言理解模型。其中,构建自然语言理解模型具体可以包括:As another embodiment of the present invention, before analyzing the user input data to be processed according to the natural language understanding model in step S101, the dialog management method may further include: constructing a natural language understanding model in advance. Among them, building a natural language understanding model can specifically include:
步骤S1011:获取第一样本集,其中,第一样本集可以包含至少一个用户输入样本数据;Step S1011: Obtain a first sample set, where the first sample set may include at least one user input sample data;
步骤S1012:对用户输入样本数据进行标注处理,获取用户输入样本数据的特征信息,以生成第二样本集,其中,第二样本集可以包含用户输入样本数据的特征信息;Step S1012: Perform labeling processing on the sample data input by the user, and obtain feature information of the sample data input by the user, so as to generate a second sample set, wherein the second sample set may include the feature information of the sample data input by the user;
步骤S1013:利用第一样本集和第二样本集构建训练样本集;Step S1013: using the first sample set and the second sample set to construct a training sample set;
步骤S1014:对训练样本集进行训练,以得到自然语言理解模型,自然语言理解模型输入的是用户输入数据,输出的是用户输入数据的特征信息。Step S1014: Train the training sample set to obtain a natural language understanding model, the natural language understanding model inputs the user input data, and outputs the feature information of the user input data.
第一样本集中的用户输入数据可以是线上真实用户数据,当然本发明中在获取到真实用户数据之后,需要对这些真实数据进行清洗,将真实数据中没有信息含量的词语去掉,比如,“哈哈”以及“嘿嘿”等,也要将黑名单数据清洗掉,比如,“网络禁止语音”以及“脏话”等。本发明对这些清洗后的真实用户数据进行简单标注和人工标注,然后获得真实用户数据的特征信息。经过长时间的统计与积累,线上真实用户数据属于海量数据,因此提高了模型的准确性。The user input data in the first sample set may be online real user data. Of course, after the real user data is obtained in the present invention, these real data need to be cleaned, and words without information content in the real data are removed, for example, "Haha" and "Hey", etc., the blacklist data should also be cleaned, for example, "Voice is forbidden on the Internet" and "Profanity". The present invention performs simple labeling and manual labeling on the cleaned real user data, and then obtains characteristic information of the real user data. After a long period of statistics and accumulation, online real user data belongs to massive data, thus improving the accuracy of the model.
本发明实施例中,特征信息可以包括场景信息和槽值信息。场景信息是指根据用户数据确定用户的意图。比如,用户通过智能客服输入“我要购买一台电脑”,可以确定用户的目的是购买,通过智能客服进行售前咨询;如果用户通过智能客服输入“我要将之前下单的商品退货”,可以确定用户的目的是退货,通过智能客服进行售后退货咨询。槽值信息是指数据中的关键词信息,槽值信息分为用户输入数据中的槽值信息inform_slot和机器想要的槽值信息request_slot。比如用户输入“我要买小米手机,要屏幕大一点的”,需要标注“小米”为inform_slot中的品牌词,“手机”为inform_slot中的产品词,机器仅仅知道小米手机不能立刻做出推荐,机器需要知道价位、颜色、内存等其它槽值信息request_slot,就能做出比较好的商品推荐。图2是根据本发明实施例的手机品类下的槽值信息的示意图,其中槽值信息可以是键值对key-value的形式,比如,槽值信息的key是品牌词,value是华为。In this embodiment of the present invention, the feature information may include scene information and slot value information. Context information refers to determining the user's intent based on user data. For example, if the user enters "I want to buy a computer" through the intelligent customer service, it can be determined that the user's purpose is to buy, and the intelligent customer service conducts pre-sales consultation; if the user enters "I want to return the previously ordered product" through the intelligent customer service, It can be determined that the user's purpose is to return goods, and after-sales return consultation is carried out through intelligent customer service. The slot value information refers to the keyword information in the data, and the slot value information is divided into the slot value information inform_slot in the user input data and the slot value information request_slot desired by the machine. For example, if a user enters "I want to buy a Xiaomi phone and want a bigger screen", it is necessary to mark "Xiaomi" as the brand word in the inform_slot, and "mobile phone" as the product word in the inform_slot. The machine only knows that the Xiaomi phone cannot make a recommendation immediately. If you need to know the price, color, memory and other slot value information request_slot, you can make better product recommendations. 2 is a schematic diagram of slot value information under a mobile phone category according to an embodiment of the present invention, where the slot value information may be in the form of a key-value pair, for example, the key of the slot value information is a brand word and the value is Huawei.
上文对这些清洗后的真实用户数据进行简单标注是指程序根据提前制定好的规则,对真实用户数据进行初步标注。优化标注是指将简单标注后的数据发送到标注人员,标注人员进行人工标注,修改错误的,保留正确的,生成真实用户数据的特征信息。考虑到本发明涉及到多轮会话,因此需要标注的槽值信息除了包括:产品词、品牌词、修饰词、询问范围、频道编号等信息外,还包括属性槽值,例如商品的尺寸、颜色、用途等,可能还需要标注动态槽值,即,可能变动的槽值,比如,手机品类下的内存大小,衣服品类下的尺码大小等。图3是根据本发明实施例的标注槽值信息的格式示意图。The simple labeling of the cleaned real user data above means that the program preliminarily labels the real user data according to the rules formulated in advance. Optimizing annotation refers to sending the simply annotated data to the annotator, who manually annotates, revises the wrong one, and retains the correct one, and generates the characteristic information of the real user data. Considering that the present invention involves multiple rounds of conversations, the slot value information that needs to be marked includes not only product words, brand words, modifiers, query range, channel number, etc., but also attribute slot values, such as product size, color, etc. , usage, etc., you may also need to mark the dynamic slot value, that is, the slot value that may change, such as the memory size under the mobile phone category, and the size under the clothing category. FIG. 3 is a schematic diagram of a format of labeling slot value information according to an embodiment of the present invention.
步骤S102:确定待处理用户输入数据对应的历史记录信息,根据特征信息和历史记录数据信息,确定当前对话状态。对话状态是整个多轮会话过程中,机器根据用户输入数据反馈得到的对话状态。比如,用户第一轮输入数据是“我要买一台电脑”,机器根据用户的第一轮输入数据,得到对话状态是“用户需要购买电脑”,响应数据是“请问您需要什么品牌的电脑”,然后用户第二轮的输入数据是“品牌A”,接着机器根据用户的第二轮输入数据和之前的对话状态,得到当前对话状态是“用户需要购买品牌为A的电脑”。Step S102: Determine the history record information corresponding to the user input data to be processed, and determine the current dialog state according to the feature information and the history record data information. The dialogue state is the dialogue state obtained by the machine according to the user's input data during the entire multi-round conversation process. For example, the user's first round of input data is "I want to buy a computer". According to the user's first round of input data, the machine obtains the dialog status as "The user needs to buy a computer", and the response data is "May I ask what brand of computer do you need?" , and then the user's second round of input data is "brand A", and then the machine obtains the current dialogue state according to the user's second round of input data and the previous dialogue state is "the user needs to buy a computer with brand A".
本发明实施例中,历史记录信息可以包括:用户历史输入数据、用户历史输入数据的特征信息、以及用户历史输入数据的对话状态。其中,用户历史输入数据是待处理用户输入数据之前的预设n轮的用户输入数据,n为不小于零的整数。如果n是零,则历史记录信息设置为空。历史记录信息用于让机器拥有记忆知识,比如上述实例中,用户第二轮输入数据为待处理用户输入数据,则机器需要记住用户第一轮输入数据是什么,这样在后续的人机交互中,机器记忆了用户的目的是购买一台电脑,就会针对用户需要的电脑的具体信息进行咨询,例如,品牌、价格以及尺寸等。记录第一轮输入数据的特征信息的目的是利用特征信息判断上下文的相关性,在下文中具体阐述,此处不具体解释。记录用户历史输入数据的对话状态的目的是为了判断待处理用户输入数据的对话状态是否改变,在下文中具体阐述,此处不具体解释。In this embodiment of the present invention, the historical record information may include: user historical input data, feature information of the user historical input data, and dialog status of the user historical input data. Wherein, the historical user input data is the user input data of n preset rounds before the user input data to be processed, and n is an integer not less than zero. If n is zero, the history information is set to null. The historical record information is used to let the machine have memory knowledge. For example, in the above example, the user's second round of input data is the user's input data to be processed, then the machine needs to remember what the user's first round of input data is, so that in the subsequent human-computer interaction In , the machine remembers that the user's purpose is to buy a computer, and will consult the specific information about the computer the user needs, such as brand, price, and size. The purpose of recording the feature information of the first round of input data is to use the feature information to determine the relevance of the context, which will be described in detail below, and will not be explained here. The purpose of recording the dialog state of the user's historical input data is to determine whether the dialog state of the user input data to be processed has changed, which will be described in detail below and will not be explained in detail here.
作为本发明的再一个实施例,步骤S102中的根据特征信息和历史记录信息确定当前对话状态可以包括:As yet another embodiment of the present invention, determining the current dialog state according to the feature information and the history record information in step S102 may include:
S1021:根据重叠度原则、场景分类原则或者模型相关性原则,判断待处理用户输入数据和用户历史输入数据是否相关;S1021: According to the overlapping degree principle, the scene classification principle or the model correlation principle, determine whether the user input data to be processed is related to the user historical input data;
S1022:当待处理用户输入数据和用户历史输入数据相关时,根据用户历史输入数据的对话状态和待处理用户输入数据,更新当前对话状态;S1022: when the user input data to be processed is related to the user historical input data, update the current dialogue state according to the dialog state of the user historical input data and the user input data to be processed;
S1023:当待处理用户输入数据和用户历史输入数据不相关时,根据待处理用户输入数据生成新的对话状态,并将新的对话状态确定为当前对话状态。S1023: When the user input data to be processed and the user historical input data are not related, generate a new dialog state according to the user input data to be processed, and determine the new dialog state as the current dialog state.
本发明中,首先从重叠度原则、场景分类原则或者模型相关性原则三个选项中至少一项,判断用户历史输入数据和待处理用户输入数据是否相关,若是相关的,则更新之前的对话状态,否则,开始新的对话状态。例如,用户第1轮输入数据是“我要买一台电脑”,机器根据第1轮输入数据确定对话状态为“用户需要购买一台电脑”,然后向用户发出“请问您需要什么品牌的电脑”的响应数据,然后用户第2轮的输入数据是“我向买一部手机”,机器判断用户的第1轮输入数据和第2轮输入数据是不相关的,因此,生成对话状态为“用户需要购买一部手机”,并向用户发出“请问您需要什么品牌的手机”的响应数据,然后用户第3轮的输入数据是“品牌B”,机器根据第1轮输入数据确定对话状态为“用户需要购买一台电脑”,机器判断用户的第2轮输入数据和第3轮输入数据是相关的,更新对话状态为“用户需要购买品牌为B的手机”。In the present invention, at least one of the three options of the overlapping degree principle, the scene classification principle or the model correlation principle is used to determine whether the user's historical input data and the user's input data to be processed are related, and if so, the previous dialogue state is updated. , otherwise, start a new dialog state. For example, the user's input data in the first round is "I want to buy a computer", and the machine determines the dialog state according to the input data in the first round as "The user needs to buy a computer", and then sends the user "May I ask what brand of computer do you want?" Then the user's input data in the second round is "I want to buy a mobile phone", the machine judges that the user's input data in the first round and the input data in the second round are irrelevant, therefore, the generated dialogue state is "user Need to buy a mobile phone", and send the response data of "What brand of mobile phone do you need" to the user, then the user's input data in the third round is "brand B", and the machine determines the dialog state according to the input data in the first round as "" The user needs to buy a computer", the machine judges that the user's second round of input data and the third round of input data are related, and the update dialog state is "the user needs to buy a mobile phone of brand B".
需要注意的是,本发明中用户历史输入数据是待处理用户输入数据之前的预设n轮的用户输入数据,n为不小于零的整数。因此,若待处理用户输入数据是第5轮用户输入数据,n的取值为3,则判断第5轮用户输入数据和用户历史输入数据是否相关的方法具体解释为:It should be noted that the historical user input data in the present invention is the user input data of n preset rounds before the user input data to be processed, and n is an integer not less than zero. Therefore, if the user input data to be processed is the fifth round user input data, and the value of n is 3, then the method for judging whether the fifth round user input data and user historical input data are related is specifically explained as:
首先,判断第5轮用户输入数据和第4轮用户输入数据是否相关,若相关,则根据第4轮用户输入数据对应的对话状态和第5轮用户输入数据,更新当前对话状态;First, determine whether the 5th round of user input data and the 4th round of user input data are relevant, if relevant, update the current dialogue state according to the dialog state corresponding to the 4th round of user input data and the 5th round of user input data;
当第5轮用户输入数据和第4轮用户输入数据不相关时,判断第5轮用户输入数据和第3轮用户输入数据是否相关,若相关,则根据第3轮用户输入数据对应的对话状态和第5轮用户输入数据,更新当前对话状态;When the 5th round of user input data and the 4th round of user input data are not related, judge whether the 5th round of user input data and the 3rd round of user input data are related, if relevant, according to the dialog state corresponding to the 3rd round of user input data and the fifth round of user input data to update the current dialog state;
当第5轮用户输入数据和第3轮用户输入数据不相关时,判断第5轮用户输入数据和第2轮用户输入数据是否相关,若相关,则根据第3轮用户输入数据对应的对话状态和第5轮用户输入数据,更新当前对话状态;When the 5th round of user input data and the 3rd round of user input data are not related, judge whether the 5th round of user input data and the 2nd round of user input data are related, if relevant, according to the dialog state corresponding to the 3rd round of user input data and the fifth round of user input data to update the current dialog state;
当第5轮用户输入数据和第2轮用户输入数据不相关时,直接根据第5轮用户输入数据生成当前对话状态。When the user input data in the fifth round is not related to the user input data in the second round, the current dialog state is generated directly according to the user input data in the fifth round.
本发明实施例中,在上述步骤S1021判断待处理用户输入数据和用户历史输入数据是否相关之后,对话管理方法还可以包括:利用神经网络门函数计算待处理用户输入数据的门权重;根据门权重,计算待处理用户输入数据和用户历史输入数据的相关度值;若相关度值大于预设相关度阈值,则确认待处理用户输入数据和用户历史输入数据相关。本发明中,在判断待处理用户输入数据和用户历史输入数据相关之后,可以计算待处理用户输入数据和用户历史输入数据的相关度值,根据相关度值可以得到具体相关程度,当相关程度达到一定数值时,认为待处理用户输入数据和用户历史输入数据相关,这样可以进一步保证上下文相关性预测的准确性。In the embodiment of the present invention, after judging whether the user input data to be processed and the user historical input data are related in the above step S1021, the dialog management method may further include: using a neural network gate function to calculate the gate weight of the user input data to be processed; , calculate the correlation value between the user input data to be processed and the user historical input data; if the correlation value is greater than the preset correlation threshold, it is confirmed that the user input data to be processed and the user historical input data are related. In the present invention, after judging that the user input data to be processed is related to the user historical input data, the correlation value between the user input data to be processed and the user historical input data can be calculated, and the specific correlation degree can be obtained according to the correlation value. When the value is a certain value, it is considered that the user input data to be processed is related to the user historical input data, which can further ensure the accuracy of the context correlation prediction.
作为本发明的又一个实施例,特征信息可以包括:槽值信息。因此,上述步骤S1021中的根据重叠度原则判断待处理用户输入数据和用户历史输入数据是否相关可以包括:计算待处理用户输入数据的槽值信息与用户历史输入数据的槽值信息的重叠度,并判断重叠度是否大于预设重叠度,若是,则确认待处理用户输入数据和用户历史输入数据相关。例如,用户第1轮输入数据是“我要买一台电脑”,则第1轮输入数据的槽值信息是“电脑”,用户第2轮的输入数据是“我要买一台品牌为A的电脑”,则第2轮输入数据的槽值信息是“电脑”和“品牌A”,确定用户第1轮输入数据的槽值信息和用户第2轮输入数据的槽值信息的重叠度很高,因此认为用户第1轮输入数据和用户第2轮输入数据是相关的。As another embodiment of the present invention, the feature information may include: slot value information. Therefore, judging whether the user input data to be processed and the user historical input data are related according to the overlapping degree principle in the above step S1021 may include: calculating the degree of overlap between the slot value information of the user input data to be processed and the slot value information of the user historical input data, And it is judged whether the overlap degree is greater than the preset overlap degree, and if so, it is confirmed that the user input data to be processed is related to the user historical input data. For example, the user's input data in the first round is "I want to buy a computer", then the slot value information of the first round of input data is "computer", and the user's input data in the second round is "I want to buy a computer of brand A" ", the slot value information of the second round of input data is "computer" and "brand A", it is determined that the overlap of the slot value information of the user's first round of input data and the user's second round of input data is very high, Therefore, it is considered that the user's first round input data and the user's second round input data are related.
作为本发明的另一个实施例,特征信息可以包括:场景信息。因此,上述步骤S1021中的根据场景分类原则判断待处理用户输入数据和用户历史输入数据是否相关可以包括:判断待处理用户输入数据的场景信息和用户历史输入数据的场景信息是否相同,若是,则认为待处理用户输入数据的场景和用户历史输入数据的场景相同,并确认待处理用户输入数据和用户历史输入数据相关。例如,用户第1轮输入数据是“我要买一台电脑”,则第1轮输入数据的场景信息是“购买电脑”,用户第2轮的输入数据是“我要买一部手机”,则第2轮输入数据的场景信息是“购买手机”,则认为用户第1轮输入数据的场景信息和用户第2轮输入数据的场景信息是不相同的,因此认为用户第1轮输入数据和用户第2轮输入数据是不相关的。As another embodiment of the present invention, the feature information may include: scene information. Therefore, judging whether the user input data to be processed and the user historical input data are related according to the scene classification principle in the above step S1021 may include: judging whether the scene information of the user input data to be processed and the scene information of the user historical input data are the same, and if so, then It is considered that the scenario of the user input data to be processed is the same as the scenario of the user historical input data, and it is confirmed that the user input data to be processed is related to the user historical input data. For example, the user's input data in the first round is "I want to buy a computer", then the scene information of the first round of input data is "buy a computer", and the user's input data in the second round is "I want to buy a mobile phone", then the first round of input data is "I want to buy a mobile phone". The scene information of the 2 rounds of input data is "purchasing a mobile phone", then it is considered that the scene information of the user's 1st round of input data and the user's 2nd round of input data are different. The 2 rounds of input data are irrelevant.
作为本发明的再一个实施例,上述步骤S1021中的根据模型相关性原则判断待处理用户输入数据和用户历史输入数据是否相关可以包括:根据预先构建的上下文相关模型对待处理用户输入数据和用户历史输入数据进行相关性分析,若相关性分析结果是相关,则确认待处理用户输入数据和用户历史输入数据相关。As yet another embodiment of the present invention, determining whether the user input data to be processed and the user history input data are related according to the model correlation principle in the above step S1021 may include: the user input data to be processed and the user history input data to be processed according to a pre-built context-dependent model Correlation analysis is performed on the input data. If the correlation analysis result is related, it is confirmed that the user input data to be processed is related to the user historical input data.
本发明实施例中,在上文根据预先构建的上下文相关模型对待处理用户输入数据和用户历史输入数据进行相关性分析之前,对话管理方法还可以包括:基于动态记忆网络算法构建上下文相关模型。本发明中动态记忆网路算法包括四个子模块,分别是:输入文本子模块,问题子模块,情景记忆网络子模块和答案生成子模块。问题子模块在本发明中就是待处理用户输入数据,情景记忆网络子模块是用深度学习神经网络的方式构建待处理用户输入数据和用户历史输入数据的关系,答案生成子模块是预测待处理用户输入数据和用户历史输入数据的关系,如果有关系输出yes,如果没关系输出no。In the embodiment of the present invention, before the correlation analysis is performed on the user input data to be processed and the user historical input data according to the pre-built context-dependent model, the dialog management method may further include: constructing a context-dependent model based on a dynamic memory network algorithm. The dynamic memory network algorithm in the present invention includes four sub-modules, namely: an input text sub-module, a question sub-module, a situational memory network sub-module and an answer generation sub-module. The question sub-module is the user input data to be processed in the present invention, the episodic memory network sub-module uses a deep learning neural network to construct the relationship between the pending user input data and the user's historical input data, and the answer generation sub-module is to predict the pending user input data. The relationship between the input data and the user's historical input data, if there is a relationship, output yes, if not, output no.
输入文本子模块是把汉字短语转化为计算机识别的分布式向量数字,输入信息的方式可以是语音数据,也可以是文本数据,如果是语音数据,需要先借助语音识别模型将语音数据转化为文字数据,接着用自然语言处理的技术。在本发明中,输入序列T1是由字符w1,w2,…,wT等构成。本发明输入序列通过循环神经网络(Recurrent Neural Network,简写为RNN)编码(可以但不限于是RNN编码,也可以是其他编码形式,本发明对此不作限定),在每个时刻t,RNN网络都会更新隐状态ht=RNN(L[wt],ht-1),其中L是编码矩阵,wt是输入序列第t个汉字的字符索引。如果用户输入文本是单个短句子,直接进入RNN网络,输出隐状态;如果用户输入文本是比较长的序列,本发明会提取槽值,然后把槽值存储到列表中,隐状态的向量就作为输出。本发明还可以选用计算复杂度较低的GRU(Gated Recurrent Unit,是循环神经网络的一种变体,结构比较简单,由输入门、遗忘门、输出门函数组成)进行编码。假设在时刻t,输入文本序列是xt,隐状态是ht,则GRU的结构定义如下:The input text sub-module is to convert Chinese phrases into distributed vector numbers recognized by the computer. The input information can be voice data or text data. If it is voice data, it is necessary to first convert the voice data into text with the help of a voice recognition model. The data is then processed using natural language techniques. In the present invention, the input sequence T 1 is composed of characters w 1 , w 2 , . . . , w T and so on. The input sequence of the present invention is encoded by a cyclic neural network (Recurrent Neural Network, abbreviated as RNN) (it may be, but not limited to, RNN encoding, or other encoding forms, which are not limited in the present invention), and at each time t, the RNN network Both update the hidden state h t =RNN(L[w t ],h t-1 ), where L is the encoding matrix, and w t is the character index of the t-th Chinese character in the input sequence. If the user input text is a single short sentence, directly enter the RNN network and output the hidden state; if the user input text is a relatively long sequence, the invention will extract the slot value, and then store the slot value in the list, and the vector of the hidden state is used as output. The present invention can also select GRU (Gated Recurrent Unit, which is a variant of cyclic neural network, with relatively simple structure, composed of input gate, forget gate and output gate function) with lower computational complexity for coding. Assuming that at time t, the input text sequence is x t and the hidden state is h t , the structure of the GRU is defined as follows:
zt=σ(W(z)xt+U(z)ht-1+b(z))z t =σ(W (z) x t +U (z) h t-1 +b (z) )
rt=σ(W(r)xt+U(r)ht-1+b(r))r t =σ(W (r) x t +U (r) h t-1 +b (r) )
其中是自定义的一个算子,W是神经网路输入层的权重,U是隐藏层的权重,b是常量,W(z)、W(r)、U(z)、U(r)、和n这7个均为超参数,综合可以概括为ht=GRU(xt,ht-1)。in is a user-defined operator, W is the weight of the input layer of the neural network, U is the weight of the hidden layer, b is a constant, W (z) , W (r) , U (z) , U (r) , and n are all hyperparameters, and the synthesis can be summarized as h t =GRU(x t ,h t-1 ).
问题子模块和输入文本序列一样,也是以字符的形式输入到模型中,通过循环神经网络RNN进行编码,问题TQ由一系列字符串组成,编码为数学向量,其中L表示字符短语编码矩阵,表示问题中第t个字符或词语的索引。Like the input text sequence, the question sub-module is also input into the model in the form of characters, and is encoded by the recurrent neural network RNN. The question T Q consists of a series of strings and is encoded as a mathematical vector, where L represents the character phrase encoding matrix, Represents the index of the t-th character or word in the question.
情景记忆网络子模块用于更新输入文本子模块内部的情景记忆,核心组件是通过注意力机制来迭代记忆,在每一次迭代中,注意力机制的综合向量c,考虑了当前的问题q和前一次的记忆mi-1,产生当前的情景ei,之后情景向量ei和记忆向量mi会被用到,更新情景记忆网络公式是mi=GRU(ei,mi-1),GRU的初始向量是问题本身m0=q,随着网络的搭建,可能需要多种情景记忆,比如智能助理中用户第一句话说“我昨天浏览了品牌为B的手机”,第二句话说“但是我今天想买品牌为C的手机”,这两句话就可以看成多个情景,用户当前输入信息“我要买屏幕大一点的品牌为C的手机”就相当于问题,动态记忆网络需要根据用户前两句输入,识别当前信息和之前输入是否有关系。本发明使用门函数作为注意力机制,计算公式是其中ct是输入文本,mi-1是记忆网络,q是问题,在本发明中指当前用户输入信息,门函数达到预先设定阈值或者满足最大迭代次数,网络就收敛,停止迭代。The episodic memory network sub-module is used to update the episodic memory inside the input text sub-module. The core component is iterative memory through the attention mechanism. In each iteration, the comprehensive vector c of the attention mechanism takes into account the current problem q and the previous Memory mi-1 once to generate the current scenario e i , and then the scenario vector e i and memory vector mi will be used. The formula for updating the scenario memory network is mi =GRU(e i ,m i -1 ), The initial vector of GRU is the problem itself m 0 =q. With the construction of the network, various episodic memories may be required. For example, in the first sentence of the intelligent assistant, the user said "I browsed the mobile phone of brand B yesterday", and the second sentence said "But I want to buy a mobile phone with brand C today", these two sentences can be regarded as multiple scenarios. The user's current input information "I want to buy a mobile phone with brand C with a larger screen" is equivalent to a problem. Dynamic Memory Network It is necessary to identify whether the current information is related to the previous input according to the user's input of the first two sentences. The present invention uses the gate function as the attention mechanism, and the calculation formula is Where c t is the input text, m i-1 is the memory network, q is the problem, in the present invention it refers to the current user input information, the gate function reaches the preset threshold or satisfies the maximum number of iterations, the network converges and stops the iteration.
答案生成子模块用于通过向量计算生成答案。本发明可以搭建另一个GRU网络生成答案。记忆网络的最后状态mTM作为GRU网络的输入,在每一个时刻,输入还包括问题向量q,上一层的隐状态at-1和前一个预测输出yt-1,计算公式是yt=soft max(W(a)at),at=GRU([yt-1,q],at-1),本发明损失函数是交叉熵,做二分类“yes”或“no”的预测,表示上下文“相关”或“不相关”。The answer generation submodule is used to generate answers through vector computation. The present invention can build another GRU network to generate answers. The last state m TM of the memory network is used as the input of the GRU network. At each moment, the input also includes the problem vector q, the hidden state a t-1 of the previous layer and the previous prediction output y t-1 , the calculation formula is y t =soft max(W (a) at ), at = GRU([y t -1 , q ], at -1 ), the loss function of the present invention is cross entropy, and the binary classification is "yes" or "no" predictions, denoting contextually "relevant" or "irrelevant".
本发明中,基于动态记忆网络算法构建的上下文相关模型的参数设置如下:In the present invention, the parameters of the context-dependent model constructed based on the dynamic memory network algorithm are set as follows:
(1)循环神经网络的细胞数,英文表示为recurrent_cell_size,本发明可以设置为128;(1) The number of cells of the cyclic neural network, expressed in English as recurrent_cell_size, can be set to 128 in the present invention;
(2)深入文本字符的向量维度,英文表示为D,本发明可以设置为50;(2) In-depth vector dimension of text characters, expressed as D in English, and can be set to 50 in the present invention;
(3)深度学习中优化算法的学习率,英文表示为Learning_rate,本发明可以设置为0.005;(3) The learning rate of the optimization algorithm in deep learning, expressed in English as Learning_rate, can be set to 0.005 in the present invention;
(4)输入层的随机神经元丢失率,英文表示为Input_p,本发明可以设置为0.5;(4) The random neuron loss rate of the input layer, expressed as Input_p in English, can be set to 0.5 in the present invention;
(5)输出层的随机神经元丢失率,英文表示为Output_p,本发明可以设置为0.5;(5) The random neuron loss rate of the output layer, expressed in English as Output_p, can be set to 0.5 in the present invention;
(6)每次训练一个batch的数据量,英文表示为Batch_size,本发明可以设置为128;(6) The amount of data for training one batch at a time, expressed in English as Batch_size, can be set to 128 in the present invention;
(7)情景记忆网络中的记忆片段,英文表示为Passes,本发明可以设置为4;(7) The memory segment in the episodic memory network, expressed in English as Passes, can be set to 4 in the present invention;
(8)前向传播的隐层网络大小,英文表示为Ff_hidden_size,本发明可以设置为256;(8) The hidden layer network size of forward propagation, expressed in English as Ff_hidden_size, can be set to 256 in the present invention;
(9)权重自动衰减速率,英文表示为Weight_decay,本发明可以设置为0.00000001;(9) The weight automatic decay rate, expressed in English as Weight_decay, can be set to 0.00000001 in the present invention;
(10)网络每次可以训练的问题个数,英文表示为Training_iterations_count,本发明可以设置为400000;(10) The number of questions that the network can train each time, expressed in English as Training_iterations_count, which can be set to 400,000 in the present invention;
(11)验证集中每隔多少次迭代展示一次,英文表示为Display_step,本发明可以设置为100;(11) How many iterations are displayed in the verification set, which is expressed as Display_step in English, and can be set to 100 in the present invention;
(12)会话上下文,英文表示为Context;(12) Session context, expressed in English as Context;
(13)句子结尾标志,英文表示为Input_sentence_endings;(13) Sentence end marker, expressed in English as Input_sentence_endings;
(14)神经网络的门函数,英文表示为Input_gru。(14) The gate function of the neural network, expressed in English as Input_gru.
步骤S103:根据当前对话状态,基于神经网络算法生成与待处理用户输入数据对应的响应数据。比如,用户的输入数据是“我要买品牌为A的手机”,就提供了品牌槽值是“A”,产品槽值是“手机”,机器获取到用户输入数据的槽值信息inform_slot之后,不能立刻做出推荐,需要知道价位、颜色、内存等其它槽值,因此,机器会生成响应数据“请问您要价格为多少的手机”,用户获取到机器的响应数据,会继续输入“我要买价格范围在1000元到2000元之间的手机”,然后机器就会获取到对话状态为“用户要买品牌为A,价格范围在1000元到2000元之间的手机”,会接着询问其他槽值信息,然后向用户推荐手机,若机器发现没有适合用户的手机,会向用户推荐其他相似的手机。Step S103: According to the current dialogue state, the response data corresponding to the user input data to be processed is generated based on the neural network algorithm. For example, if the user's input data is "I want to buy a mobile phone with brand A", the brand slot value is "A", and the product slot value is "mobile phone". To make a recommendation immediately, you need to know the price, color, memory and other slot values. Therefore, the machine will generate the response data "May I ask what the price of the mobile phone is", and the user will continue to enter "I want to buy the price of the phone" when the user obtains the response data from the machine mobile phones in the range of 1,000 yuan to 2,000 yuan", then the machine will obtain the dialog status as "the user wants to buy a mobile phone with brand A and price range between 1,000 yuan and 2,000 yuan", and will then ask for other slot value information , and then recommend the mobile phone to the user. If the machine finds that there is no mobile phone suitable for the user, it will recommend other similar mobile phones to the user.
图4是根据本发明一个可参考实施例的对话管理方法的主要流程的示意图。如图4所示,对话管理方法的主要流程可以包括:FIG. 4 is a schematic diagram of the main flow of a dialog management method according to a referenced embodiment of the present invention. As shown in Figure 4, the main flow of the dialogue management method may include:
步骤S401:构建自然语言理解模型,构建的自然语言理解模型输入的是用户输入数据,输出的是用户输入数据的场景信息和槽值信息;Step S401: constructing a natural language understanding model, the constructed natural language understanding model inputs the user input data, and outputs the scene information and slot value information of the user input data;
步骤S402:根据自然语言理解模型对待处理用户输入数据进行处理,获取待处理用户输入数据的场景信息和槽值信息;Step S402: Process the user input data to be processed according to the natural language understanding model, and obtain scene information and slot value information of the user input data to be processed;
步骤S403:确定待处理用户输入数据对应的历史记录信息,确定的历史记录信息可以包括:用户历史输入数据、用户历史输入数据的特征信息、以及用户历史输入数据的对话状态,其中,用户历史输入数据是待处理用户输入数据之前的预设n轮的用户输入数据,n为不小于零的整数;Step S403: Determine the historical record information corresponding to the user input data to be processed. The determined historical record information may include: the user historical input data, the feature information of the user historical input data, and the dialog state of the user historical input data, wherein the user historical input data The data is the user input data of the preset n rounds before the user input data to be processed, and n is an integer not less than zero;
步骤S404:计算待处理用户输入数据的槽值信息与用户历史输入数据的槽值信息的重叠度;Step S404: Calculate the degree of overlap between the slot value information of the user input data to be processed and the slot value information of the user's historical input data;
步骤S405:判断重叠度是否大于预设重叠度,若是,则执行步骤S409,否则,执行步骤S411;Step S405: determine whether the degree of overlap is greater than the preset degree of overlap, if so, go to step S409, otherwise, go to step S411;
步骤S406:判断待处理用户输入数据的场景信息和用户历史输入数据的场景信息是否相同,若是,则执行步骤S409,否则,执行步骤S411;Step S406: Determine whether the scene information of the user input data to be processed is the same as the scene information of the user historical input data, if so, go to step S409, otherwise, go to step S411;
步骤S407:基于动态记忆网络算法构建上下文相关模型,并根据预先构建的上下文相关模型对待处理用户输入数据和用户历史输入数据进行相关性分析;Step S407: constructing a context-dependent model based on the dynamic memory network algorithm, and performing a correlation analysis on the user input data to be processed and the user's historical input data according to the pre-built context-dependent model;
步骤S408:根据相关性分析结果,判断待处理用户输入数据的场景信息和用户历史输入数据是否相关,若是,则执行步骤S409,否则,执行步骤S411;Step S408: According to the correlation analysis result, determine whether the scene information of the user input data to be processed is related to the user historical input data, if so, go to step S409, otherwise, go to step S411;
步骤S409:计算待处理用户输入数据和用户历史输入数据的相关度值,并判断计算的相关度值是否大于预设相关度阈值,若是,则执行步骤S410,否则,执行步骤S411;Step S409: Calculate the correlation value between the user input data to be processed and the user's historical input data, and determine whether the calculated correlation value is greater than the preset correlation threshold, if so, go to step S410, otherwise, go to step S411;
步骤S410:根据用户历史输入数据的对话状态和待处理用户输入数据,更新当前对话状态;Step S410: Update the current dialog state according to the dialog state of the user's historical input data and the user input data to be processed;
步骤S411:根据待处理用户输入数据生成新的对话状态,并将新的对话状态确定为当前对话状态;Step S411: generating a new dialogue state according to the user input data to be processed, and determining the new dialogue state as the current dialogue state;
步骤S412:根据当前对话状态,基于神经网络算法生成与待处理用户输入数据对应的响应数据。Step S412: According to the current dialogue state, the response data corresponding to the user input data to be processed is generated based on the neural network algorithm.
需要注意的是,上述步骤S401中的构建自然语言理解模型在上文(步骤S1011至步骤S1014)中具体解释了,此处不再累述。此外,上文也详细解释了如何计算待处理用户输入数据和用户历史输入数据的相关度值,因此步骤S409中不再累述。还需要注意的是,上述步骤是只要待处理用户输入数据和用户历史输入数据只要在槽值重叠度、场景信息相同或者相关性分析结果一个方面符合要求,则就可以确认待处理用户输入数据和用户历史输入数据是相关的,然后执行步骤S409。在实际应用中,可以设置三个方面均符合要求,才能够确认待处理用户输入数据和用户历史输入数据是相关的,或者是利用为这三个方面设置权重的方法,当权重值符合某个条件的时候(例如,大于某个值),才能够确认待处理用户输入数据和用户历史输入数据是相关的,当然,也可以采用其他方法,本发明对此不做限定。It should be noted that the construction of the natural language understanding model in the above step S401 has been specifically explained in the above (steps S1011 to S1014 ), and will not be repeated here. In addition, the above also explains in detail how to calculate the correlation value between the user input data to be processed and the user historical input data, so step S409 will not be repeated. It should also be noted that in the above steps, as long as the user input data to be processed and the user historical input data meet the requirements in terms of the overlap of slot values, the same scene information, or the results of correlation analysis, the user input data to be processed and the user input data can be confirmed. The user's historical input data is relevant, and then step S409 is executed. In practical applications, all three aspects can be set to meet the requirements to confirm that the user input data to be processed and the user historical input data are related, or the method of setting weights for these three aspects can be used. Only when the conditions are met (for example, greater than a certain value), it can be confirmed that the user input data to be processed and the user historical input data are related. Of course, other methods can also be used, which are not limited in the present invention.
为了方便理解,以“机器”为“智能助理”为例,对实现本发明对话管理方法的整体框架进行详细说明,得到图5所示的实现本发明对话管理方法的整体架构图。如图5所示,实现本发明的对话管理方法的整体框架可以包括:智能助理多轮对话标注模块、智能助理多轮对话框架模块、对话管理上下文关系提取模块、动态记忆网络算法模块、多轮对话效果模块和线上测试切流量模块。For the convenience of understanding, taking the "machine" as an "intelligent assistant" as an example, the overall framework for implementing the dialog management method of the present invention is described in detail, and the overall architecture diagram for implementing the dialog management method of the present invention is obtained as shown in FIG. 5 . As shown in FIG. 5 , the overall framework for implementing the dialogue management method of the present invention may include: an intelligent assistant multi-round dialogue labeling module, an intelligent assistant multi-round dialogue framework module, a dialogue management context relationship extraction module, a dynamic memory network algorithm module, a multi-round dialogue frame module Dialogue effect module and online test cut traffic module.
其中,智能助理多轮对话标注模块包括:语音助手日志表、对话清洗和标注槽值设计三个单元。语音助手日志表单元用于提取线上真实的用户数据,让标注人员标注,获取到标注好的语料,将真实数据和标注好的预料输入模型训练,生成自然语音理解模型。对话清洗用户对用户的输入数据和智能助理的响应数据进行清洗。标注槽值设计用于定义需要获取哪些槽值信息。Among them, the intelligent assistant multi-round dialogue labeling module includes three units: voice assistant log table, dialogue cleaning and labeling slot value design. The voice assistant log table unit is used to extract real online user data, let the annotator mark it, obtain the marked corpus, and train the real data and the marked expected input model to generate a natural speech understanding model. Conversation cleaning The user cleans the user's input data and the assistant's response data. Annotation slot values are designed to define which slot value information needs to be obtained.
智能助理多轮对话框架模块是多轮会话的整体框架逻辑抽象,包括:自然语言理解模块、对话管理子模块和自然语言生成子模块。其中,自然语音理解模块用于识别用户的意图(即,识别用户的场景信息),并且提取出产品词、品牌词以及修饰词等槽值信息。自然语音理解模块可以细分为场景意图分类模型和用户自然语言理解模型。场景意图分类模型的作用是:对用户在智能助理的输入语句进行分类,判断是哪个业务场景;用户自然语言理解模型的作用是:对用户在智能助理的输入语句进行分析,识别出品牌词、产品词和修饰词等槽值信息。对话管理子模块用于识别用户当前对话状态,判断对话状态是否需要切换。对话管理子模块可细分为多轮对话单元、知识图谱单元和对话状态维护单元。多轮对话单元是智能助理和用户进行多次交互;知识图谱单元是让智能助理拥有记忆知识,比如用户说“中国的首都”,智能助理知道是北京;对话状态维护单元是整个多轮对话过程中,使对话正常运行的单元。自然语言生成模块用于智能助理生成响应数据。The intelligent assistant multi-round dialogue framework module is the overall framework logic abstraction of multi-round conversation, including: natural language understanding module, dialogue management sub-module and natural language generation sub-module. Among them, the natural speech understanding module is used to identify the user's intention (ie, identify the user's scene information), and extract slot value information such as product words, brand words, and modifier words. The natural speech understanding module can be subdivided into a scene intent classification model and a user natural language understanding model. The role of the scene intent classification model is to classify the user's input sentences in the intelligent assistant and determine which business scenario it is; the role of the user's natural language understanding model is to analyze the user's input sentences in the intelligent assistant, identify brand words, Slot value information such as product words and modifiers. The dialog management sub-module is used to identify the current dialog state of the user and determine whether the dialog state needs to be switched. The dialog management sub-module can be subdivided into multi-round dialog units, knowledge graph units and dialog state maintenance units. The multi-round dialogue unit is the interaction between the intelligent assistant and the user; the knowledge graph unit allows the intelligent assistant to have memorized knowledge. For example, if the user says "the capital of China", the intelligent assistant knows that it is Beijing; the dialogue state maintenance unit is the entire multi-round dialogue process. , the unit that makes the conversation work. The natural language generation module is used by the intelligent assistant to generate response data.
对话管理上下文关系提取模块用于管理上下文,识别用户当前输入是不是还属于上一轮对话,还用于判断提取的产品词、品牌词哪些需要记忆,哪些可以遗忘。对话管理上下文关系提取模块分为三个层次,即槽值重叠度、意图重叠度和动态记忆网络算法,这三个层次是从三个不同角度预测上下文的关系。The dialogue management context extraction module is used to manage the context, identify whether the user's current input still belongs to the previous round of dialogue, and determine which of the extracted product words and brand words need to be remembered and which can be forgotten. The dialogue management context relationship extraction module is divided into three levels, namely, the overlap of slot values, the overlap of intentions and the dynamic memory network algorithm. These three levels predict the relationship of context from three different angles.
动态记忆网络算法模块是用于对多轮对话的上下文进行管理,用户在智能助理中输入的话会与上一句话进行动态记忆网络匹配,如果网络特征匹配,就会预测为上下文相关,则不关闭当前对话,如果网络特征不匹配,就会预测为上下文不相关,则关闭当前对话,进行下一个对话状态。在此模块中,将用户的输入的上文信息和用户输入的当前信息输入到具有情景记忆的动态网络中,获取到预测结果,从而判断上下文是否有关系。The dynamic memory network algorithm module is used to manage the context of multiple rounds of dialogue. If the user enters the intelligent assistant, it will be matched with the previous sentence by the dynamic memory network. If the network features match, it will be predicted as context-related, and it will not be closed. In the current dialogue, if the network features do not match, it will be predicted that the context is irrelevant, the current dialogue will be closed, and the next dialogue state will be performed. In this module, the above information input by the user and the current information input by the user are input into the dynamic network with episodic memory, and the prediction result is obtained to determine whether the context is related.
多轮对话效果模块包括算法评估指标和业务评估指标两部分,用于评价对话管理算法的准确性。线上测试切流量模块用于在智能助理上线之前,对智能助理进行测试,测试各种用户输入数据,获取线上模型测试结果,这样可以验证对话管理方法的效果,根据测试结果发现问题并改进,从而确保上线测试的效率可靠性。The multi-round dialogue effect module includes two parts: algorithm evaluation indicators and business evaluation indicators, which are used to evaluate the accuracy of dialogue management algorithms. The online test traffic cut module is used to test the intelligent assistant, test various user input data, and obtain the online model test results before the intelligent assistant goes online, so as to verify the effect of the dialogue management method, find problems and improve according to the test results. , so as to ensure the efficiency and reliability of on-line testing.
根据本发明实施例的对话管理的技术方案可以看出,能够利用自然语言理解模型获取用户输入数据的特征信息,然后根据历史记录信息,确定当前对话状态,进而生成响应数据,从而可以减少大量正则程序的设计和维护成本,提高识别用户输入数据的准确性,提升用户体验;本发明实施例中对第一样本集和第二样本集组成的训练样本集进行训练,以获得自然语言理解模型,从而可以利用海量的样本集数据构建自然语言理解模型,提高了识别用户输入数据的准确性;本发明实施例中从重叠度原则、场景分类原则或者模型相关性原则多个角度判断待处理用户输入数据和用户历史输入数据的相关性,从而可以提高预测上下文关系的准确性,进一步提升用户体验;本发明实施例中根据槽值信息判断待处理用户输入数据和用户历史输入数据的重叠度,从而可以从输入数据的关键词的角度,预测上下文的相关性;本发明实施例中根据场景信息判断待处理用户输入数据和用户历史输入数据的相关性,从而可以根据输入数据的场景,预测上下文的相关性;本发明实施例中根据预构的上下文相关模型,判断待处理用户输入数据和用户历史输入数据的相关性,从而可以借助海量的数据生成的模型,对上下文的相关性进行预测;本发明实施例中还根据神经网络门函数计算待处理用户输入数据和用户历史输入数据的相关度值,从而可以提高预测上下文相关性的准确性。According to the technical solution for dialogue management in the embodiment of the present invention, it can be seen that the natural language understanding model can be used to obtain the characteristic information of the user input data, and then the current dialogue state can be determined according to the historical record information, and then the response data can be generated, so that a large number of regular expressions can be reduced. Program design and maintenance costs, improve the accuracy of identifying user input data, and improve user experience; in the embodiment of the present invention, the training sample set composed of the first sample set and the second sample set is trained to obtain a natural language understanding model , so that a natural language understanding model can be constructed by using massive sample set data, and the accuracy of identifying user input data is improved; in the embodiment of the present invention, the user to be processed is judged from multiple perspectives: the principle of overlap, the principle of scene classification, or the principle of model correlation The correlation between the input data and the user's historical input data can improve the accuracy of the predicted context relationship and further improve the user experience; Therefore, the relevance of the context can be predicted from the perspective of the keywords of the input data; in the embodiment of the present invention, the relevance of the user input data to be processed and the user historical input data can be judged according to the scene information, so that the context can be predicted according to the scene of the input data. In the embodiment of the present invention, the correlation between the user input data to be processed and the user historical input data is judged according to a pre-built context correlation model, so that the context correlation can be predicted with the help of a model generated by massive data; In the embodiment of the present invention, the correlation value between the user input data to be processed and the user historical input data is also calculated according to the neural network gate function, so that the accuracy of predicting the contextual correlation can be improved.
图6是根据本发明实施例的对话管理装置的主要模块的示意图。如图6所示,本发明实施例的对话管理装置600主要包括以下模块:获取模块601、确定模块602和生成模块603。FIG. 6 is a schematic diagram of main modules of a dialog management apparatus according to an embodiment of the present invention. As shown in FIG. 6 , the
其中,获取模块601可用于根据自然语言理解模型对待处理用户输入数据进行处理,获取待处理用户输入数据的特征信息。确定模块602可用于确定待处理用户输入数据对应的历史记录信息,根据特征信息和历史记录信息,确定当前对话状态。生成模块603可用于根据当前对话状态,基于神经网络算法生成与待处理用户输入数据对应的响应数据。The obtaining
本发明实施例中,获取模块601还可用于:获取第一样本集,第一样本集包含至少一个用户输入样本数据;对用户输入样本数据进行标注处理,获取用户输入样本数据的特征信息,以生成第二样本集,第二样本集包含用户输入样本数据的特征信息;利用第一样本集和第二样本集构建训练样本集;对训练样本集进行训练,以得到自然语言理解模型,自然语言理解模型输入的是用户输入数据,输出的是用户输入数据的特征信息。In this embodiment of the present invention, the obtaining
本发明实施例中,历史记录信息可以包括:用户历史输入数据、用户历史输入数据的特征信息、以及用户历史输入数据的对话状态。用户历史输入数据是待处理用户输入数据之前的预设n轮的用户输入数据,n为不小于零的整数。In this embodiment of the present invention, the historical record information may include: user historical input data, feature information of the user historical input data, and dialog status of the user historical input data. The historical user input data is the user input data of the preset n rounds before the user input data to be processed, where n is an integer not less than zero.
本发明实施例中,确定模块602还可用于:根据重叠度原则、场景分类原则或者模型相关性原则,判断待处理用户输入数据和用户历史输入数据是否相关;当待处理用户输入数据和用户历史输入数据相关时,根据用户历史输入数据的对话状态和待处理用户输入数据,更新当前对话状态;当待处理用户输入数据和用户历史输入数据不相关时,根据待处理用户输入数据生成新的对话状态,并将新的对话状态确定为当前对话状态。In this embodiment of the present invention, the determining
本发明实施例中,特征信息可以包括:槽值信息。确定模块602还可用于:计算待处理用户输入数据的槽值信息与用户历史输入数据的槽值信息的重叠度,并判断重叠度是否大于预设重叠度,若是,则确认待处理用户输入数据和用户历史输入数据相关。In this embodiment of the present invention, the feature information may include: slot value information. The determining
本发明实施例中,特征信息还可以包括:场景信息。确定模块602还可用于:判断待处理用户输入数据的场景信息和用户历史输入数据的场景信息是否相同,若是,则认为待处理用户输入数据的场景和用户历史输入数据的场景相同,并确认待处理用户输入数据和用户历史输入数据相关。In this embodiment of the present invention, the feature information may further include: scene information. The determining
本发明实施例中,确定模块602还可用于:根据预先构建的上下文相关模型对待处理用户输入数据和用户历史输入数据进行相关性分析,若相关性分析结果是相关,则确认待处理用户输入数据和用户历史输入数据相关。In this embodiment of the present invention, the determining
本发明实施例中,确定模块602还可用于:基于动态记忆网络算法构建上下文相关模型。In this embodiment of the present invention, the determining
本发明实施例中,确定模块602还可用于:利用神经网络门函数计算待处理用户输入数据的门权重;根据门权重,计算待处理用户输入数据和用户历史输入数据的相关度值;若相关度值大于预设相关度阈值,则确认待处理用户输入数据和用户历史输入数据相关In this embodiment of the present invention, the determining
从以上描述可以看出,能够利用自然语言理解模型获取用户输入数据的特征信息,然后根据历史记录信息,确定当前对话状态,进而生成响应数据,从而可以减少大量正则程序的设计和维护成本,提高识别用户输入数据的准确性,提升用户体验;本发明实施例中对第一样本集和第二样本集组成的训练样本集进行训练,以获得自然语言理解模型,从而可以利用海量的样本集数据构建自然语言理解模型,提高了识别用户输入数据的准确性;本发明实施例中从重叠度原则、场景分类原则或者模型相关性原则多个角度判断待处理用户输入数据和用户历史输入数据的相关性,从而可以提高预测上下文关系的准确性,进一步提升用户体验;本发明实施例中根据槽值信息判断待处理用户输入数据和用户历史输入数据的重叠度,从而可以从输入数据的关键词的角度,预测上下文的相关性;本发明实施例中根据场景信息判断待处理用户输入数据和用户历史输入数据的相关性,从而可以根据输入数据的场景,预测上下文的相关性;本发明实施例中根据预构的上下文相关模型,判断待处理用户输入数据和用户历史输入数据的相关性,从而可以借助海量的数据生成的模型,对上下文的相关性进行预测;本发明实施例中还根据神经网络门函数计算待处理用户输入数据和用户历史输入数据的相关度值,从而可以提高预测上下文相关性的准确性。It can be seen from the above description that the natural language understanding model can be used to obtain the characteristic information of the user input data, and then the current dialogue state can be determined according to the historical record information, and then the response data can be generated, which can reduce the design and maintenance costs of a large number of regular programs and improve the Identify the accuracy of user input data and improve user experience; in the embodiment of the present invention, a training sample set composed of a first sample set and a second sample set is trained to obtain a natural language understanding model, so that a massive sample set can be used The data constructs a natural language understanding model, which improves the accuracy of identifying user input data; in the embodiment of the present invention, the user input data to be processed and the user historical input data are judged from multiple perspectives: the overlapping degree principle, the scene classification principle or the model correlation principle. Correlation, thereby improving the accuracy of predicting the context relationship and further improving the user experience; in the embodiment of the present invention, the degree of overlap between the user input data to be processed and the user historical input data is judged according to the slot value information, so that the keywords of the input data can be determined from the input data. From the perspective of the input data, the correlation of the context is predicted; in the embodiment of the present invention, the correlation between the user input data to be processed and the historical input data of the user is judged according to the scene information, so that the correlation of the context can be predicted according to the scene of the input data; the embodiment of the present invention According to the pre-built context-related model, the correlation between the user input data to be processed and the user's historical input data is judged, so that the context correlation can be predicted with the help of the model generated by massive data; The network gate function calculates the correlation value between the user input data to be processed and the user's historical input data, so that the accuracy of predicting contextual correlation can be improved.
图7示出了可以应用本发明实施例的对话管理方法或对话管理装置的示例性系统架构700。FIG. 7 shows an
如图7所示,系统架构700可以包括终端设备701、702、703,网络704和服务器705。网络704用以在终端设备701、702、703和服务器705之间提供通信链路的介质。网络704可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。As shown in FIG. 7 , the
用户可以使用终端设备701、702、703通过网络704与服务器705交互,以接收或发送消息等。终端设备701、702、703上可以安装有各种通讯客户端应用,例如购物类应用、网页浏览器应用、搜索类应用、即时通信工具、邮箱客户端、社交平台软件等(仅为示例)。The user can use the
终端设备701、702、703可以是具有显示屏并且支持网页浏览的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机和台式计算机等等。The
服务器705可以是提供各种服务的服务器,例如对用户利用终端设备701、702、703所浏览的购物类网站提供支持的后台管理服务器(仅为示例)。后台管理服务器可以对接收到的产品信息查询请求等数据进行分析等处理,并将处理结果(例如目标推送信息、产品信息--仅为示例)反馈给终端设备。The
需要说明的是,本发明实施例所提供的对话管理方法一般由服务器705执行,相应地,对话管理装置一般设置于服务器705中。It should be noted that the dialog management method provided by the embodiment of the present invention is generally executed by the
应该理解,图7中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 7 are only illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
下面参考图8,其示出了适于用来实现本发明实施例的终端设备的计算机系统800的结构示意图。图8示出的终端设备仅仅是一个示例,不应对本发明实施例的功能和使用范围带来任何限制。Referring next to FIG. 8 , it shows a schematic structural diagram of a
如图8所示,计算机系统800包括中央处理单元(CPU)801,其可以根据存储在只读存储器(ROM)802中的程序或者从存储部分808加载到随机访问存储器(RAM)803中的程序而执行各种适当的动作和处理。在RAM 803中,还存储有系统800操作所需的各种程序和数据。CPU 801、ROM 802以及RAM 803通过总线804彼此相连。输入/输出(I/O)接口805也连接至总线804。As shown in FIG. 8, a
以下部件连接至I/O接口805:包括键盘、鼠标等的输入部分806;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分807;包括硬盘等的存储部分808;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分809。通信部分809经由诸如因特网的网络执行通信处理。驱动器810也根据需要连接至I/O接口805。可拆卸介质811,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器810上,以便于从其上读出的计算机程序根据需要被安装入存储部分808。The following components are connected to the I/O interface 805: an
特别地,根据本发明公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本发明公开的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分809从网络上被下载和安装,和/或从可拆卸介质811被安装。在该计算机程序被中央处理单元(CPU)801执行时,执行本发明的系统中限定的上述功能。In particular, the processes described above with reference to the flowcharts may be implemented as computer software programs in accordance with the disclosed embodiments of the present invention. For example, embodiments disclosed herein include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the
需要说明的是,本发明所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本发明中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本发明中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or a combination of any of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In the present invention, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the present invention, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本发明各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.
描述于本发明实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括获取模块、确定模块和生成模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,获取单元还可以被描述为“根据自然语言理解模型对待处理用户输入数据进行处理,获取待处理用户输入数据的特征信息的模块”。The modules involved in the embodiments of the present invention may be implemented in a software manner, and may also be implemented in a hardware manner. The described modules can also be provided in the processor, for example, it can be described as: a processor includes an acquisition module, a determination module and a generation module. Among them, the names of these modules do not constitute a limitation of the module itself under certain circumstances. For example, the acquisition unit can also be described as "processing the user input data to be processed according to the natural language understanding model, and obtaining the user input data to be processed. module for feature information".
作为另一方面,本发明还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:根据自然语言理解模型对待处理用户输入数据进行处理,获取待处理用户输入数据的特征信息;确定待处理用户输入数据对应的历史记录信息,根据特征信息和历史记录信息,确定当前对话状态;根据当前对话状态,基于神经网络算法生成与待处理用户输入数据对应的响应数据。As another aspect, the present invention also provides a computer-readable medium, which may be included in the device described in the above embodiments; or may exist alone without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes: processing the user input data to be processed according to the natural language understanding model, and obtaining the user input data to be processed. feature information of the data; determine the historical record information corresponding to the user input data to be processed, and determine the current dialog state according to the feature information and historical record information; generate response data corresponding to the user input data to be processed based on the current dialog state based on a neural network algorithm .
根据本发明实施例的技术方案,能够利用自然语言理解模型获取用户输入数据的特征信息,然后根据历史记录信息,确定当前对话状态,进而生成响应数据,从而可以减少大量正则程序的设计和维护成本,提高识别用户输入数据的准确性,提升用户体验;本发明实施例中对第一样本集和第二样本集组成的训练样本集进行训练,以获得自然语言理解模型,从而可以利用海量的样本集数据构建自然语言理解模型,提高了识别用户输入数据的准确性;本发明实施例中从重叠度原则、场景分类原则或者模型相关性原则多个角度判断待处理用户输入数据和用户历史输入数据的相关性,从而可以提高预测上下文关系的准确性,进一步提升用户体验;本发明实施例中根据槽值信息判断待处理用户输入数据和用户历史输入数据的重叠度,从而可以从输入数据的关键词的角度,预测上下文的相关性;本发明实施例中根据场景信息判断待处理用户输入数据和用户历史输入数据的相关性,从而可以根据输入数据的场景,预测上下文的相关性;本发明实施例中根据预构的上下文相关模型,判断待处理用户输入数据和用户历史输入数据的相关性,从而可以借助海量的数据生成的模型,对上下文的相关性进行预测;本发明实施例中还根据神经网络门函数计算待处理用户输入数据和用户历史输入数据的相关度值,从而可以提高预测上下文相关性的准确性According to the technical solution of the embodiment of the present invention, the natural language understanding model can be used to obtain the characteristic information of the user input data, and then the current dialogue state can be determined according to the historical record information, and then the response data can be generated, thereby reducing the design and maintenance costs of a large number of regular programs. , improve the accuracy of identifying user input data and improve user experience; in the embodiment of the present invention, the training sample set composed of the first sample set and the second sample set is trained to obtain a natural language understanding model, so that a massive The sample set data builds a natural language understanding model, which improves the accuracy of identifying user input data; in the embodiment of the present invention, the user input data to be processed and the user historical input are judged from multiple perspectives: the principle of overlap, the principle of scene classification, or the principle of model correlation Therefore, the accuracy of predicting the context relationship can be improved, and the user experience can be further improved; in the embodiment of the present invention, the degree of overlap between the user input data to be processed and the user historical input data is determined according to the slot value information, so that the input data can be obtained from the input data. From the perspective of keywords, the correlation of the context is predicted; in the embodiment of the present invention, the correlation between the user input data to be processed and the historical input data of the user is judged according to the scene information, so that the correlation of the context can be predicted according to the scene of the input data; the present invention In the embodiment, the correlation between the user input data to be processed and the user's historical input data is judged according to a pre-built context-related model, so that the context correlation can be predicted with the help of a model generated by massive data; Calculate the correlation value between the user input data to be processed and the user historical input data according to the neural network gate function, so as to improve the accuracy of predicting contextual correlation
上述具体实施方式,并不构成对本发明保护范围的限制。本领域技术人员应该明白的是,取决于设计要求和其他因素,可以发生各种各样的修改、组合、子组合和替代。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明保护范围之内。The above-mentioned specific embodiments do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims (20)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810893032.7A CN110858226B (en) | 2018-08-07 | 2018-08-07 | Dialogue management method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810893032.7A CN110858226B (en) | 2018-08-07 | 2018-08-07 | Dialogue management method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110858226A true CN110858226A (en) | 2020-03-03 |
CN110858226B CN110858226B (en) | 2024-12-06 |
Family
ID=69634712
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810893032.7A Active CN110858226B (en) | 2018-08-07 | 2018-08-07 | Dialogue management method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110858226B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368040A (en) * | 2018-12-25 | 2020-07-03 | 马上消费金融股份有限公司 | Dialogue processing method, model training method and related equipment |
CN111753074A (en) * | 2020-06-30 | 2020-10-09 | 贝壳技术有限公司 | Method, device, medium and electronic equipment for realizing session |
CN112261234A (en) * | 2020-10-23 | 2021-01-22 | 北京蓦然认知科技有限公司 | Method for voice assistant to execute local task and voice assistant |
CN112579235A (en) * | 2020-12-16 | 2021-03-30 | 平安银行股份有限公司 | Method, transcoding center, client, device and medium for internationalizing response data |
CN113641808A (en) * | 2021-07-30 | 2021-11-12 | 未鲲(上海)科技服务有限公司 | Slot information-based answering method, device, equipment and storage medium |
WO2022142028A1 (en) * | 2020-12-28 | 2022-07-07 | 平安科技(深圳)有限公司 | Dialog state determination method, terminal device and storage medium |
CN115186092A (en) * | 2022-07-11 | 2022-10-14 | 贝壳找房(北京)科技有限公司 | Online interaction processing method and apparatus, storage medium, and program product |
Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140257793A1 (en) * | 2013-03-11 | 2014-09-11 | Nuance Communications, Inc. | Communicating Context Across Different Components of Multi-Modal Dialog Applications |
CN105704013A (en) * | 2016-03-18 | 2016-06-22 | 北京光年无限科技有限公司 | Context-based topic updating data processing method and apparatus |
CN106354835A (en) * | 2016-08-31 | 2017-01-25 | 上海交通大学 | Artificial dialogue auxiliary system based on context semantic understanding |
CN106503156A (en) * | 2016-10-24 | 2017-03-15 | 北京百度网讯科技有限公司 | Man-machine interaction method and device based on artificial intelligence |
CN106777013A (en) * | 2016-12-07 | 2017-05-31 | 科大讯飞股份有限公司 | Dialogue management method and apparatus |
CN106776578A (en) * | 2017-01-03 | 2017-05-31 | 竹间智能科技(上海)有限公司 | Talk with the method and device of performance for lifting conversational system |
CN107369443A (en) * | 2017-06-29 | 2017-11-21 | 北京百度网讯科技有限公司 | Dialogue management method and device based on artificial intelligence |
CN107480143A (en) * | 2017-09-12 | 2017-12-15 | 山东师范大学 | Dialogue topic dividing method and system based on context dependence |
CN107644641A (en) * | 2017-07-28 | 2018-01-30 | 深圳前海微众银行股份有限公司 | Session operational scenarios recognition methods, terminal and computer-readable recording medium |
CN107766559A (en) * | 2017-11-06 | 2018-03-06 | 第四范式(北京)技术有限公司 | Training method, trainer, dialogue method and the conversational system of dialog model |
CN107885756A (en) * | 2016-09-30 | 2018-04-06 | 华为技术有限公司 | Dialogue method, device and equipment based on deep learning |
CN108197191A (en) * | 2017-12-27 | 2018-06-22 | 神思电子技术股份有限公司 | A kind of scene of more wheel dialogues is intended to interrupt method |
-
2018
- 2018-08-07 CN CN201810893032.7A patent/CN110858226B/en active Active
Patent Citations (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20140257793A1 (en) * | 2013-03-11 | 2014-09-11 | Nuance Communications, Inc. | Communicating Context Across Different Components of Multi-Modal Dialog Applications |
CN105704013A (en) * | 2016-03-18 | 2016-06-22 | 北京光年无限科技有限公司 | Context-based topic updating data processing method and apparatus |
CN106354835A (en) * | 2016-08-31 | 2017-01-25 | 上海交通大学 | Artificial dialogue auxiliary system based on context semantic understanding |
CN107885756A (en) * | 2016-09-30 | 2018-04-06 | 华为技术有限公司 | Dialogue method, device and equipment based on deep learning |
CN106503156A (en) * | 2016-10-24 | 2017-03-15 | 北京百度网讯科技有限公司 | Man-machine interaction method and device based on artificial intelligence |
CN106777013A (en) * | 2016-12-07 | 2017-05-31 | 科大讯飞股份有限公司 | Dialogue management method and apparatus |
CN106776578A (en) * | 2017-01-03 | 2017-05-31 | 竹间智能科技(上海)有限公司 | Talk with the method and device of performance for lifting conversational system |
CN107369443A (en) * | 2017-06-29 | 2017-11-21 | 北京百度网讯科技有限公司 | Dialogue management method and device based on artificial intelligence |
CN107644641A (en) * | 2017-07-28 | 2018-01-30 | 深圳前海微众银行股份有限公司 | Session operational scenarios recognition methods, terminal and computer-readable recording medium |
CN107480143A (en) * | 2017-09-12 | 2017-12-15 | 山东师范大学 | Dialogue topic dividing method and system based on context dependence |
CN107766559A (en) * | 2017-11-06 | 2018-03-06 | 第四范式(北京)技术有限公司 | Training method, trainer, dialogue method and the conversational system of dialog model |
CN108197191A (en) * | 2017-12-27 | 2018-06-22 | 神思电子技术股份有限公司 | A kind of scene of more wheel dialogues is intended to interrupt method |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111368040A (en) * | 2018-12-25 | 2020-07-03 | 马上消费金融股份有限公司 | Dialogue processing method, model training method and related equipment |
CN111368040B (en) * | 2018-12-25 | 2021-01-26 | 马上消费金融股份有限公司 | Dialogue processing method, model training method and related equipment |
CN111753074A (en) * | 2020-06-30 | 2020-10-09 | 贝壳技术有限公司 | Method, device, medium and electronic equipment for realizing session |
CN112261234A (en) * | 2020-10-23 | 2021-01-22 | 北京蓦然认知科技有限公司 | Method for voice assistant to execute local task and voice assistant |
CN112261234B (en) * | 2020-10-23 | 2021-11-16 | 北京蓦然认知科技有限公司 | Method for voice assistant to execute local task and voice assistant |
CN112579235A (en) * | 2020-12-16 | 2021-03-30 | 平安银行股份有限公司 | Method, transcoding center, client, device and medium for internationalizing response data |
CN112579235B (en) * | 2020-12-16 | 2024-05-21 | 平安银行股份有限公司 | Method, transcoding center, client, device and medium for internationalization of response data |
WO2022142028A1 (en) * | 2020-12-28 | 2022-07-07 | 平安科技(深圳)有限公司 | Dialog state determination method, terminal device and storage medium |
CN113641808A (en) * | 2021-07-30 | 2021-11-12 | 未鲲(上海)科技服务有限公司 | Slot information-based answering method, device, equipment and storage medium |
CN115186092A (en) * | 2022-07-11 | 2022-10-14 | 贝壳找房(北京)科技有限公司 | Online interaction processing method and apparatus, storage medium, and program product |
Also Published As
Publication number | Publication date |
---|---|
CN110858226B (en) | 2024-12-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110858226B (en) | Dialogue management method and device | |
CN107491534B (en) | Information processing method and device | |
CN110019732B (en) | Intelligent question answering method and related device | |
US12147775B2 (en) | Content augmentation with machine generated content to meet content gaps during interaction with target entities | |
US11756094B2 (en) | Method and device for evaluating comment quality, and computer readable storage medium | |
TW202009749A (en) | Human-machine dialog method, device, electronic apparatus and computer readable medium | |
CN107220386A (en) | Information-pushing method and device | |
CN114840671B (en) | Dialogue generation method, model training method, device, equipment and medium | |
CN110119445B (en) | Method and device for generating feature vector and classifying text based on feature vector | |
WO2019154411A1 (en) | Word vector retrofitting method and device | |
CN113268560B (en) | Method and apparatus for text matching | |
CN110457339A (en) | Data search method and device, electronic device, storage medium | |
CN114861889A (en) | Deep learning model training method, target object detection method and device | |
CN111368551A (en) | Method and device for determining event subject | |
CN110738056B (en) | Method and device for generating information | |
WO2024146468A1 (en) | Model generation method and apparatus, entity recognition method and apparatus, electronic device, and storage medium | |
CN110489730A (en) | Text handling method, device, terminal and storage medium | |
WO2025091924A1 (en) | Human-computer method and apparatus, electronic device, and storage medium | |
CN118551019A (en) | Answer text generation method, device, equipment, storage medium and program product | |
CN113761143A (en) | Method, apparatus, device and medium for determining answers to user questions | |
CN117573973A (en) | Resource recommendation methods, devices, electronic devices and storage media | |
CN114911940B (en) | Text emotion recognition method and device, electronic device, and storage medium | |
CN113704442B (en) | A method and device for processing consultation request | |
CN116451700A (en) | Target sentence generation method, device, equipment and storage medium | |
CN116049370A (en) | Information query method and training method and device of information generation model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |