WO2018196684A1 - 对话机器人生成方法及装置 - Google Patents

对话机器人生成方法及装置 Download PDF

Info

Publication number
WO2018196684A1
WO2018196684A1 PCT/CN2018/083836 CN2018083836W WO2018196684A1 WO 2018196684 A1 WO2018196684 A1 WO 2018196684A1 CN 2018083836 W CN2018083836 W CN 2018083836W WO 2018196684 A1 WO2018196684 A1 WO 2018196684A1
Authority
WO
WIPO (PCT)
Prior art keywords
machine learning
learning model
user
robot
initial corpus
Prior art date
Application number
PCT/CN2018/083836
Other languages
English (en)
French (fr)
Inventor
汤鹏飞
彭明超
白铖
王远斌
赵紫星
Original Assignee
北京京东尚科信息技术有限公司
北京京东世纪贸易有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京京东尚科信息技术有限公司, 北京京东世纪贸易有限公司 filed Critical 北京京东尚科信息技术有限公司
Publication of WO2018196684A1 publication Critical patent/WO2018196684A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis

Definitions

  • the present disclosure relates to the field of machine learning technology, and in particular, to a dialog robot generation method and apparatus.
  • Intelligent dialogue robots use artificial intelligence domain technologies such as natural language processing and machine learning to receive user consultation questions, understand problem semantics, identify user intent, and give correct responses.
  • Intelligent conversational robots typically use machine learning models to receive user queries and generate responses.
  • the inventors of the present disclosure have found that the related art has the following problems: the customer service robot needs to be established and maintained by a professional technician through programming, and it is difficult to meet the needs of business development.
  • the ordinary user who does not have the programming ability has the desire to construct his own customer service robot.
  • a technical problem to be solved by the embodiments of the present disclosure is that an existing general user needs to construct a dialog robot by programming.
  • the present disclosure provides a dialog robot generation method and apparatus.
  • a dialog robot generating method including: a determining step of determining a machine learning model to be created based on a robot input instruction input by a user; and a training step to be performed from a user
  • the initial corpus set trains the machine learning model as a training sample
  • the deploying step acquires the trained machine learning model based on a user-entered robot deployment instruction
  • the training the machine learning model by using the initial corpus from the user as a training sample comprises: performing classification training based on the initial corpus in the initial corpus to obtain the initial corpus for determining a classification rule of the category; displaying the classification rule to the user, so that the user labels the initial corpus based on the classification rule; and according to the result of the user submitting the category of the initial corpus, the initial of the category is marked
  • the corpus trains the machine learning model as a training sample.
  • the classification training based on the initial corpus in the initial corpus set, and the classification rule used to determine the category of the initial corpus includes: extracting feature information of the initial corpus; using the feature upper and lower bits At least one of the feature synonym relationship is generalized to the feature information; the generalized information is clustered to obtain a clustering result of the initial corpus; and the cluster is fused The result is a classification result of the initial corpus; and the classification rule is established based on the classification result.
  • the method further comprises: performing a classification test on the set of verification corpus using the machine learning model; and determining a success rate of the classification test and a threshold Comparing; if the success rate is lower than the threshold, prompting the user to input a new initial corpus, and using the new initial corpus as a new training sample to continue training the machine learning model .
  • the success rate is higher than the threshold, stopping training the machine learning model; receiving response information set by a user corresponding to the category of the initial corpus; and learning at the machine The corresponding relationship between the category and the response information is set in the model.
  • the inputting the dialog interaction information input by the user to the machine learning model corresponding to the robot dialog entry comprises: transmitting text information input by the user to a robot portal corresponding to the text information; Performing error correction processing on the text information; performing word segmentation processing on the text information after the error correction processing; performing feature word extraction on the text information after the word segmentation processing; and constructing the text based on the feature words a semantic vector of information; the semantic vector is input to the machine learning model corresponding to the robot portal, such that the machine learning model determines a category of the text information based on the semantic vector, to obtain the category Corresponding response information.
  • the robot includes: a customer service robot, and the category includes at least one of return, payment, and purchase.
  • a dialog robot generating apparatus including: a model determining module, configured to determine a machine learning model to be created based on a robot input instruction input by a user; a model training module For training the machine learning model as a training sample from a user's initial corpus; a model deployment module for acquiring the trained machine learning model for deployment based on a user-entered robot deployment instruction; an entry setting module a method for setting a robot dialog entry corresponding to the machine learning model, and a run control module, configured to input dialog interaction information from the user into the machine learning model corresponding to the robot dialog entry, so that the machine The learning model generates response information.
  • the model training module includes: a corpus classification unit, configured to perform classification training based on the initial corpus in the initial corpus, to obtain a classification rule for determining a category of the initial corpus; a unit, configured to display the classification rule to a user, so that the user labels the initial corpus based on the classification rule; and the sample training unit is configured to mark the result according to the user-submitted category of the initial corpus
  • the machine learning model is trained as a training sample with a class of initial corpus.
  • the corpus classification unit is further configured to extract feature information of the initial corpus; and generalize the feature information by using at least one of a feature upper and lower position and a feature synonym relationship;
  • the feature information is subjected to clustering processing to obtain a clustering result of the initial corpus; the clustering result is merged to obtain a classification result of the initial corpus; and the classification rule is established based on the classification result.
  • the sample training unit is further configured to perform a classification test on the verification corpus using the machine learning model; compare a success rate of the classification test with a threshold; and the success rate is lower than the In the case of a threshold, the user is prompted to enter a new initial corpus; the new initial corpus is used as a new training sample to continue training the machine learning model.
  • the sample training unit is further configured to stop training the machine learning model if the success rate is higher than the threshold; and receive a user-set corresponding to the category of the initial corpus Response information; setting a correspondence between the category and the response information in the machine learning model.
  • the operation control module further includes: an entry determining unit, configured to send text information input by the user to a robot portal corresponding to the text information; and a text processing unit configured to correct the text information Error processing; performing word segmentation processing on the character information after performing the error correction processing; performing feature word extraction on the word information after the word segmentation processing; constructing a semantic vector of the text information based on the feature word; a generating unit, configured to input the semantic vector into the machine learning model corresponding to the robot portal, so that the machine learning model determines a category of the text information based on the semantic vector, to obtain the category Corresponding response information.
  • a dialog robot generating apparatus comprising: a memory; and a processor coupled to the memory, the processor configured to be stored based on The instruction in the memory executes the dialog robot generation method as described above.
  • a computer readable storage medium storing computer instructions that are executed by a processor to implement any of the above A method of generating a dialogue robot as described.
  • the dialog robot generation method and device provided by the present disclosure open the function of establishing and deploying a dialogue robot to a user.
  • the training and deployment of the machine learning model is automatically completed by the system, and the user can automatically establish a machine learning model without using programming and can utilize the machine learning model. Responding increases the efficiency of the user building and deploying the dialogue robot.
  • FIG. 1 is a flow chart showing a dialog robot generating method according to some embodiments of the present disclosure
  • FIG. 2 is a flow chart showing the establishment of a machine learning model in a dialog robot generation method according to some embodiments of the present disclosure
  • FIG. 3 is a flow diagram showing a machine learning model generation response in a dialog robot generation method, in accordance with some embodiments of the present disclosure
  • FIG. 4 is a block diagram showing one embodiment of a dialog robot generating apparatus in accordance with some embodiments of the present disclosure
  • FIG. 5 is a block diagram showing a model training module in a dialog robot generating apparatus according to some embodiments of the present disclosure
  • FIG. 6 is a block diagram showing an operational control module in a dialog robot generating device, in accordance with some embodiments of the present disclosure
  • FIG. 7 is another block diagram showing a dialog robot generating apparatus according to some embodiments of the present disclosure.
  • FIG. 1 is a flow diagram showing a dialog robot generation method according to some embodiments of the present disclosure. As shown in FIG. 1, the method includes steps 101-104.
  • Step 101 Determine a machine learning model to be created based on a robot establishment instruction input by a user.
  • Intelligent conversational robots typically use machine learning models to receive user queries and generate responses.
  • the machine learning model is a data model that can be used to identify the user's intent by classifying the user's consulting questions.
  • Machine learning models can be varied, such as logistic regression models, random forest models, Bayesian method models, support vector machine models, neural network models, and so on.
  • Step 102 Receive an initial corpus input by the user, and train the machine learning model by using the initial corpus set as a training sample.
  • the initial corpus collection can be a consulting question received in daily work.
  • a customer receives an inquiry question sent by a customer via QQ, mail, etc., including: inquiry, order, return, etc.
  • Step 103 Acquire a trained machine learning model for deployment based on a robot deployment instruction input by the user, and set a robot dialog entry corresponding to the machine learning model.
  • Step 104 Receive dialog interaction information input by the user, and input the dialog interaction information into a machine learning model corresponding to the robot dialog entry, so that the machine learning model generates response information.
  • a customer service robot based on a trained machine learning model is deployed on an e-commerce website, and a customer service service identifier is set on the e-commerce website as a robot dialogue entry.
  • a question window pops up.
  • the customer can input the consultation question in the question window, input the consultation question into the machine learning model corresponding to the question window, and the machine learning model generates the response message and display it to the client.
  • the dialog robot generating method in the above embodiment can provide a human-machine friendly interface to the user, for example, a webpage, and prompts each step of the operation, and the establishment and deployment of the machine learning model are automatically completed by the background system.
  • the machine learning model can be used to provide automatic response to customer consultation and the like.
  • FIG. 2 is a flow diagram showing the establishment of a machine learning model in a dialog robot generation method, as shown in FIG. 2, the machine learning model establishment process including steps 201-208, in accordance with some embodiments of the present disclosure.
  • a machine learning model is created.
  • the user automatically inputs a machine learning model by inputting a custom robot name and an opening phrase through the man-machine interface.
  • Step 202 Receive an initial corpus input input by a user.
  • the machine learning model needs to learn the existing corpus.
  • the user imports the existing initial corpus through the human-machine interface, and can classify the training based on the initial corpus in the initial corpus.
  • Step 203 extract feature information of the initial corpus, and generalize the feature information by using the feature upper and lower bits and/or the feature synonym relationship, clustering the generalized feature information, and obtaining the clustering result of the initial corpus.
  • Generalization refers to replacing some similar words with the same representation, such as generalizing "170cm” to “170cm.”
  • Clustering refers to the application of clustering algorithms to classify similar corpora and to provide reference for creating classification rules. Both generalization and clustering are performed automatically by the system.
  • Step 204 Combine the clustering result to obtain a classification result of the initial corpus, and establish a classification rule based on the classification result.
  • the text description model can be a Boolean logic model, a vector space model VSM, a probability model, and the like.
  • VSM vector space model
  • probability model a probability model
  • the category of the document can be automatically divided according to the text feature.
  • Text classification algorithms include naive Bayes, K-proximity algorithm, support vector machine, artificial neural network and so on.
  • the text is segmented, the text feature words are extracted, and finally the extracted feature words are used to construct a space vector to represent the text.
  • the vector space model (VSM) is used to vectorize the text into points in the vector space, and the vector similarity is determined by the vector angle distance, the vector inner product or the Euclidean geometric distance.
  • the initial corpus imported by the user is related to the e-commerce after-sales policy.
  • the following three corpora are used as examples: 1. How to return? 2, I want to return; 3, how the refund has not been received.
  • Two classification rules "return” and "refund” can be established. Corpus 1 and 2 belong to the "return” category, and corpus 3 belongs to the "refund” category.
  • Step 205 labeling the initial corpus.
  • the classification rules are displayed to the user through the human-machine interface, and the user classifies the initial corpus based on the classification rules and labels the initial corpus.
  • the classification rules After the classification rules are created, you need to manually mark the initial corpus of the import. Mark the upcoming corpus as a classification of the classification rules so that the machine learning model "learns". For example, there is already a "Refund” category, and the initial corpus "Where can I request a refund" can be marked as belonging to the "Refund” category.
  • the machine learning model can also be used to automatically label the initial corpus to be labeled, providing a reference for manual annotation.
  • step 206 the machine learning model is trained. After receiving the result submitted by the user for the initial corpus annotation category, the initial corpus marked with the category is used as a training sample to train the machine learning model. According to the established machine learning model type, the corresponding method can be selected for training.
  • step 207 the machine learning model is verified.
  • a set of verification corpus is obtained, and a classification of the verification corpus is performed using a machine learning model to obtain a category of the verification corpus in the verification corpus.
  • Determine the success rate of the classification test determine whether the success rate is lower than a preset threshold, and if so, prompt the user to input a new initial corpus, use the new initial corpus as a new training sample, and continue to train the machine learning model. That is, steps 202-206 are repeated.
  • Step 208 deploying a machine learning model. If the success rate of the classification test of the verification corpus is higher than the threshold using the machine learning model, the training of the machine learning model is stopped. If the user needs to deploy the robot, set it through the display unit. The response information corresponding to the category set by the user is received, for example, the related return policy information is set as the response information for the "return" category. And set the robot dialog entry corresponding to the machine learning model.
  • the training and deployment of the machine learning model is automatically completed by the system.
  • the machine learning model is trained through corpus and annotation results.
  • the machine learning algorithms used are logistic regression and support vector machines.
  • the system automatically estimates the accuracy of the classification. When the accuracy is higher than the threshold, the machine learning model can be online. If the threshold is lower than the threshold, the sample needs to be added or the label modified.
  • FIG. 3 is a flow diagram showing a machine learning model generation response in a dialog robot generation method according to some embodiments of the present disclosure. As shown in FIG. 3, the flow of the machine learning model generation response includes steps 301-307.
  • Step 301 determining a robot portal corresponding to the text information.
  • the text information input by the user is received, the robot portal corresponding to the text information is determined, and the text information is sent to the robot portal.
  • a system there may be multiple robots, each with multiple entries.
  • the product page, order page, after-sales page, etc. will have customer service robot icons. Click these icons to consult the customer service robot. After receiving the user's request for consultation, the user must first locate the robot and the corresponding portal.
  • Step 302 Perform error correction processing on the text information.
  • the error correction process is to correct the typo or the error grammar in the text message of the user consultation.
  • Step 303 performing word segmentation on the text information.
  • Word segmentation is based on a word segmentation algorithm that divides the user's text information into separate words.
  • Step 304 Perform feature word extraction on the word information processed by the word segmentation, and construct a semantic vector of the text information.
  • a semantic vector of the text information In the collection obtained after the word segmentation, some invalid words will be found and can be excluded. It is also possible to identify specific entities in the text message, such as mobile phone number entities, length entities, and the like.
  • the semantic vector of the constructed text information is a vector constructed in a vector space, that is, a vector in the text vector space model, and the text information is converted into a binary representation for classification.
  • step 306 the semantic vector is input into a machine learning model corresponding to the robot portal.
  • Step 307 The machine learning model determines the category of the text information based on the semantic vector, and obtains response information corresponding to the category.
  • the machine learning model uses the vector space model to classify, compares the semantic vector with the vector of the known category of the vector space model, and uses the vector angle distance, the vector inner product or the Euclidean geometric distance to determine the similarity, and obtain the most similarity.
  • the vector of the known category that is, the category of the text information input by the user.
  • the machine learning model can perform intent recognition, that is, the constructed machine learning model classifies the vector converted by the text information, identifies the category corresponding to the user's question, and then uses the response engine to give the corresponding answer.
  • intent recognition that is, the constructed machine learning model classifies the vector converted by the text information, identifies the category corresponding to the user's question, and then uses the response engine to give the corresponding answer.
  • the process by which a machine learning model generates a response is as follows:
  • the user asks to convert to a binary string of the form "00000010000.........", which is a vector converted by the user.
  • the vectors are classified by machine learning model and can be classified as “returns”, giving pre-set answers based on the predefined response strategies and information in the “Returns” category.
  • the dialog robot generation method provided in the above embodiment opens the function of establishing and deploying a dialogue robot to the user.
  • the training and deployment of the machine learning model is automatically completed by the system, and the user can automatically establish a machine learning model without using programming and can utilize the machine learning model. Responding increases the efficiency of the user building and deploying the dialogue robot.
  • the present disclosure provides a dialog robot generation device 40 comprising: a model determination module 41, a model training module 42, a model deployment module 43, and an operation control module 44.
  • the model determination module 41 determines a machine learning model to be created based on a robot establishment instruction input by the user.
  • the model training module 42 receives the initial corpus set input by the user, and trains the machine learning model with the initial corpus set as a training sample.
  • the model deployment module 43 acquires the trained machine learning model based on the robot deployment instructions input by the user, and the portal setting module 44 sets the robot dialog entry corresponding to the machine learning model.
  • the operation control module 45 receives the dialog interaction information input by the user, and inputs the dialog interaction information into the machine learning model corresponding to the robot dialog entry, so that the machine learning model generates the response information.
  • the model training module 42 includes a corpus classification unit 421, an annotation prompting unit 422, and a sample training unit 423.
  • the corpus classification unit 421 performs classification training based on the initial corpus in the initial corpus, and acquires classification rules for determining the category of the initial corpus.
  • the annotation prompting unit 422 displays the classification rules to the user so that the user classifies the initial corpus based on the classification rules and labels the initial corpus.
  • the sample training unit 423 receives the result of the initial corpus annotation category submitted by the user, and trains the machine learning model by using the initial corpus labeled with the category as a training sample.
  • the corpus classification unit 421 extracts the feature information of the initial corpus, and generalizes the feature information by using the feature upper and lower bits and/or the feature synonym relationship.
  • the corpus classification unit 421 performs clustering processing on the generalized feature information to obtain the clustering result of the initial corpus.
  • the corpus classification unit 421 combines the clustering results to obtain the classification result of the initial corpus, and establishes a classification rule based on the classification result.
  • the sample training unit 423 obtains a set of verification corpus, performs a classification test on the set of verification corpus using a machine learning model, and obtains a category of the verification corpus in the set of verification corpus.
  • the sample training unit 423 determines the success rate of the classification check to determine whether the success rate is lower than a preset threshold. If so, the sample training unit 423 prompts the user to enter a new initial corpus and uses the new initial corpus as a new training sample to continue training the machine learning model.
  • the sample training unit 423 stops training the machine learning model.
  • the sample training unit 423 receives the response information corresponding to the category set by the user, and sets the correspondence between the category and the response information in the machine learning model.
  • the operation control module 45 includes an entry determination unit 451, a text processing unit 452, and a response generation unit 453.
  • the entry determining unit 451 receives the text information input by the user, determines the robot portal corresponding to the text information, and transmits the text information to the robot portal.
  • the text processing unit 452 performs error correction processing on the text information, performs word segmentation processing on the text information, extracts feature words from the word information subjected to the word segmentation processing, and constructs a semantic vector of the text information.
  • the response generation unit 453 inputs the semantic vector into the machine learning model corresponding to the robot entry, so that the machine learning model determines the category of the text information based on the semantic vector, and acquires the response information corresponding to the category.
  • the apparatus can include a memory 71, a processor 72, a communication interface 73, and a bus 74.
  • the memory 71 is for storing instructions
  • the processor 72 is coupled to the memory 71
  • the processor 72 is configured to perform the dialog robot generation method described above based on the instructions stored by the memory 71.
  • the memory 71 may be a high speed RAM memory, a non-volatile memory, or the like, and the memory 71 may also be a memory array.
  • the memory 71 may also be partitioned, and the blocks may be combined into a virtual volume according to certain rules.
  • the processor 72 may be a central processing unit CPU, or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the dialog robot generation method of the present disclosure.
  • the present disclosure also provides a computer readable storage medium, wherein the computer readable storage medium stores computer instructions that, when executed by a processor, implement the methods of any of the embodiments.
  • the present disclosure may be provided as a method, apparatus, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.
  • the automatic generation method and device for dialogue robot provided in the above embodiments open the function of establishing and deploying a dialogue robot to the user.
  • the training and deployment of the machine learning model is automatically completed by the system, and the user can automatically establish a machine learning model without using programming and can utilize
  • the machine learning model responds, improving the efficiency of the user to build and deploy the dialogue robot, and based on the machine learning model, the response information can be generated quickly and accurately, which improves the user experience.
  • embodiments of the present disclosure can be provided as a method, system, or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware aspects. Moreover, the present disclosure may take the form of a computer program product embodied on one or more computer-usable non-transitory storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program code. .
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Manipulator (AREA)
  • Machine Translation (AREA)

Abstract

本公开提供了一种对话机器人生成方法及装置,涉及机器学习领域,其中方法包括:基于用户输入的机器人建立指令确定所需创建的机器学习模型;将初始语料集合作为训练样本对机器学习模型进行训练;获取训练好的机器学习模型进行部署,并设置与机器学习模型对应的机器人对话入口;将对话交互信息输入与机器人对话入口相对应的机器学习模型,以使机器学习模型生成应答信息。本公开的对话机器人生成方法及装置,对用户开放建立和部署对话机器人的功能,机器学习模型的训练和部署由系统自动完成,用户无需编程便可自动建立机器学习模型并能够利用机器学习模型进行应答,提高了用户建立和部署对话机器人的效率,提升了用户体验。

Description

对话机器人生成方法及装置
相关申请的交叉引用
本申请是以CN申请号为201710270940.6,申请日为2017年4月24日的申请为基础,并主张其优先权,该CN申请的公开内容在此作为整体引入本申请中。
技术领域
本公开涉及机器学习技术领域,尤其涉及一种对话机器人生成方法及装置。
背景技术
智能对话机器人利用自然语言处理、机器学习等人工智能领域技术,接收用户咨询问题,理解问题语义、识别用户意图并给出正确的应答。智能对话机器人通常使用机器学习模型接收用户咨询并生成应答。
发明内容
本公开的发明人发现相关技术存在如下问题:客服机器人需要通过专业技术人员通过编程建立并维护,难以满足业务发展的需要,不具有编程能力的普通用户具有构建属于自己的客服机器人的愿望。有鉴于此,本公开实施例要解决的一个技术问题是:现有的普通用户需要通过编程构建对话机器人的问题,为了解决该技术问题,本公开提供一种对话机器人生成方法及装置。
根据本公开的一个或多个实施例的一个方面,提供一种对话机器人生成方法,包括:确定步骤,基于用户输入的机器人建立指令确定所需创建的机器学习模型;训练步骤,将来自用户的初始语料集合作为训练样本对所述机器学习模型进行训练;部署步骤,基于用户输入的机器人部署指令获取训练好的所述机器学习模型进行部署;设置步骤,设置与所述机器学习模型对应的机器人对话入口;输入步骤,将来自用户的对话交互信息输入与所述机器人对话入口相对应的所述机器学习模型,以使所述机器学习模型生成应答信息。
可选地,所述将来自用户的初始语料集合作为训练样本对所述机器学习模型进行训练包括:基于所述初始语料集合中的初始语料进行分类训练,用以得到用于判定所述初始语料的类别的分类规则;向用户显示所述分类规则,以使用户基于所述分类规则对所述初始语料标注类别;根据用户提交的对所述初始语料标注类别的结果,将标注有类别的初始语 料作为训练样本对所述机器学习模型进行训练。
可选地,所述基于所述初始语料集合中的初始语料进行分类训练、用以得到用于判定所述初始语料的类别的分类规则包括:提取所述初始语料的特征信息;利用特征上下位和特征同义词关系中的至少一个对所述特征信息进行泛化处理;对泛化处理后的所述特征信息进行聚类处理,用以得到所述初始语料的聚类结果;融合所述聚类结果得到所述初始语料的分类结果;基于所述分类结果建立所述分类规则。
可选地,在将所述初始语料集合作为训练样本对所述机器学习模型进行训练之后还包括:使用所述机器学习模型对验证语料集合进行分类检验;将所述分类检验的成功率与阈值进行比较;在所述成功率低于所述阈值的情况下,提示用户输入新的初始语料集合,将所述新的初始语料作为新的训练样本,用以继续对所述机器学习模型进行训练。
可选地,在所述成功率高于所述阈值的情况下,停止对所述机器学习模型进行训练;接收用户设置的与所述初始语料的类别相对应的应答信息;在所述机器学习模型中设置所述类别与所述应答信息的对应关系。
可选地,所述将用户输入的对话交互信息输入与所述机器人对话入口相对应的所述机器学习模型包括:将用户输入的文字信息发送到与此文字信息相对应的机器人入口;;对所述文字信息进行纠错处理;对进行所述纠错处理后的所述文字信息进行分词处理;对进行所述分词处理后的文字信息进行特征词提取;基于所述特征词构造所述文字信息的语义向量;将所述语义向量输入所述机器人入口对应的所述机器学习模型,以使所述机器学习模型基于所述语义向量确定所述文字信息的类别,用以得到与所述类别相对应的应答信息。
可选地,所述机器人包括:客服机器人,所述类别包括退货、付款、购买中的至少一种。
根据本公开的一个或多个实施例的另一方面,提供一种对话机器人生成装置,包括:模型确定模块,用于基于用户输入的机器人建立指令确定所需创建的机器学习模型;模型训练模块,用于将来自用户的初始语料集合作为训练样本对所述机器学习模型进行训练;模型部署模块,用于基于用户输入的机器人部署指令获取训练好的所述机器学习模型进行部署;入口设置模块,用于设置与所述机器学习模型对应的机器人对话入口;运行控制模块,用于将来自用户的对话交互信息输入与所述机器人对话入口相对应的所述机器学习模型,以使所述机器学习模型生成应答信息。
可选地,所述模型训练模块,包括:语料分类单元,用于基于所述初始语料集合中的 初始语料进行分类训练,用以得到用于判定所述初始语料的类别的分类规则;标注提示单元,用于向用户显示所述分类规则,以使用户基于所述分类规则对所述初始语料标注类别;样本训练单元,用于根据用户提交的对所述初始语料标注类别的结果,将标注有类别的初始语料作为训练样本对所述机器学习模型进行训练。
可选地,所述语料分类单元,还用于提取所述初始语料的特征信息;利用特征上下位和特征同义词关系中的至少一个对所述特征信息进行泛化处理;对泛化处理后的所述特征信息进行聚类处理,用以得到所述初始语料的聚类结果;融合所述聚类结果得到所述初始语料的分类结果;基于所述分类结果建立所述分类规则。
可选地,所述样本训练单元,还用于得到使用所述机器学习模型对验证语料集合进行分类检验;将所述分类检验的成功率与阈值进行比较;在所述成功率低于所述阈值的情况下,则提示用户输入新的初始语料集合;将所述新的初始语料作为新的训练样本,用以继续对所述机器学习模型进行训练。
可选地,所述样本训练单元,还用于在所述成功率高于所述阈值的情况下,停止对所述机器学习模型进行训练;接收用户设置的与所述初始语料的类别相对应的应答信息;在所述机器学习模型中设置所述类别与所述应答信息的对应关系。
可选地,所述运行控制模块,还包括:入口确定单元,用于将用户输入的文字信息发送到与此文字信息相对应的机器人入口;文本处理单元,用于对所述文字信息进行纠错处理;对进行所述纠错处理后的所述文字信息进行分词处理;对进行所述分词处理后的文字信息进行特征词提取;基于所述特征词构造所述文字信息的语义向量;应答生成单元,用于将所述语义向量输入所述机器人入口对应的所述机器学习模型,以使所述机器学习模型基于所述语义向量确定所述文字信息的类别,用以得到与所述类别相对应的应答信息。
根据本公开的一个或多个实施例的又一个方面,还提供一种对话机器人生成装置,包括:存储器;以及耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如上所述的对话机器人生成方法。
根据本公开的一个或多个实施例的再一个方面,还提供一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述指令被处理器执行时实现如上所述任一项所述的对话机器人生成方法。
本公开提供的对话机器人生成方法及装置,对用户开放建立和部署对话机器人的功能,机器学习模型的训练和部署由系统自动完成,用户无需编程便可自动建立机器学习模型并能够利用机器学习模型进行应答,提高了用户建立和部署对话机器人的效率。
通过以下参照附图对本公开的示例性实施例的详细描述,本公开的其它特征及其优点将会变得清楚。
附图说明
此处所说明的附图用来提供对本公开的进一步理解,构成本申请的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:
图1为示出根据本公开一些实施例的对话机器人生成方法的流程示意图;
图2为示出根据本公开一些实施例的对话机器人生成方法中的机器学习模型建立的流程示意图;
图3为示出根据本公开一些实施例的对话机器人生成方法中的机器学习模型生成应答的流程示意图;
图4为示出根据本公开一些实施例的对话机器人生成装置的一个实施例的模块示意图;
图5为示出根据本公开一些实施例的对话机器人生成装置中的模型训练模块的模块示意图;
图6为示出根据本公开一些实施例的对话机器人生成装置中的运行控制模块的模块示意图;
图7为示出根据本公开一些实施例的对话机器人生成装置的另一模块示意图。
具体实施方式
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。以下对至少一个示例性实施例的描述实际上仅仅是说明性的,决不作为对本公开及其应用或使用的任何限制。基于本公开中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。
除非另外具体说明,否则在这些实施例中阐述的部件和步骤的相对布置、数字表达式和数值不限制本公开的范围。
同时,应当明白,为了便于描述,附图中所示出的各个部分的尺寸并不是按照实际的比例关系绘制的。
对于相关领域普通技术人员已知的技术、方法和设备可能不作详细讨论,但在适当情况下,所述技术、方法和设备应当被视为授权说明书的一部分。
在这里示出和讨论的所有示例中,任何具体值应被解释为仅仅是示例性的,而不是作为限制。因此,示例性实施例的其它示例可以具有不同的值。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步讨论。
图1为示出根据本公开一些实施例的对话机器人生成方法的流程示意图,如图1所示,方法包括步骤101-104。
步骤101,基于用户输入的机器人建立指令确定所需创建的机器学习模型。
智能对话机器人通常使用机器学习模型接收用户咨询并生成应答。机器学习模型是一种数据模型,通过训练出的模型可对用户的咨询问题进行分类,从而识别用户意图。机器学习模型可以为多种,例如逻辑回归模型、随机森林模型、贝叶斯方法模型、支持向量机模型、神经网络模型等。
步骤102,接收用户输入的初始语料集合,将初始语料集合作为训练样本对机器学习模型进行训练。
初始语料集合可以为在日常工作中所接收到的咨询问题。例如,一个电商接收到的客户通过QQ、邮件等发送的咨询问题,包括:询价、订货、退货等问题。
步骤103,基于用户输入的机器人部署指令获取训练好的机器学习模型进行部署,并设置与机器学习模型对应的机器人对话入口。
步骤104,接收到用户输入的对话交互信息,将对话交互信息输入与机器人对话入口相对应的机器学习模型,以使机器学习模型生成应答信息。
例如,在电商网站上部署基于训练好的机器学习模型的客服机器人,并在电商网站上设置客服服务标识作为机器人对话入口。客户点击客服服务标识则弹出提问窗口,客户在提问窗口中可以输入咨询问题,将咨询问题输入与提问窗口相对应的机器学习模型,机器学习模型生成应答信息,并向客户显示。
上述实施例中的对话机器人生成方法,可以对用户提供人机友好界面,例如为网页,并对所进行的每一步操作都进行使用提示,机器学习模型的建立、部署都由后台系统自动完成,使普通用户能够建立自定义的机器学习模型及基于该模型的客服机器人并进行部署,可以利用机器学习模型对客户的咨询等提供自动应答。
图2为示出根据本公开一些实施例的对话机器人生成方法中的机器学习模型建立的流 程示意图,如图2所示,机器学习模型建立流程包括步骤201-208。
步骤201,创建机器学习模型。用户通过人机界面输入自定义机器人名及开头语等,自动创建机器学习模型。
步骤202,接收用户输入的初始语料集合。机器学习模型需要学习已有的语料,用户通过人机界面导入已有的初始语料,可以基于初始语料集合中的初始语料进行分类训练。
步骤203,提取初始语料的特征信息,并利用特征上下位和/或特征同义词关系对特征信息进行泛化处理,对泛化处理后的特征信息进行聚类处理,获取初始语料的聚类结果。
泛化是指将一些相似的词替换为同一种表示,例如将“170cm”泛化为“170厘米”。聚类是指应用聚类算法将相似的语料归类到一起,为创建分类规则做参考。泛化和聚类处理都由系统自动进行。
步骤204,融合聚类结果得到初始语料的分类结果,基于分类结果建立分类规则。
文本描述模型可以为布尔逻辑模型、向量空间模型VSM、概率模型等。通过文本分类算法,可根据文本特征自动划分文档所属类别。文本分类算法有朴素贝叶斯、K邻近算法、支持向量机、人工神经网络等。
例如,将文本进行分词,提取文本特征词,最后利用提取的特征词构造空间向量表示文本。采用向量空间模型(VSM)将文本向量化为向量空间的点,采用向量夹角距离,向量内积或者欧几里得几何距离判定文本相似度。
以聚类结果为参考,可以使用多种分类工具创建一些分类类别。例如,用户导入的初始语料是有关电商售后政策的,以如下三个语料为例:1、怎么退货?2、我要退货;3、退款怎么还没收到。则可建立两个分类规则“退货”及“退款”。语料1和2属于“退货”分类,语料3属于“退款”分类。
步骤205,对初始语料标注类别。通过人机界面向用户显示分类规则,用户基于分类规则对初始语料进行分类,并对初始语料标注类别。
分类规则创建完毕后,需要人工对导入的初始语料一一进行标注。标注即将语料标为属于分类规则的哪一个分类,以便机器学习模型“学习”。例如已经有“退款”分类,可将初始语料“在哪可申请退款”标注为属于“退款”分类。也可以用机器学习模型自动对需标注的初始语料进行类别标注,为人工标注提供参考。
步骤206,对机器学习模型进行训练。接收到用户提交的对初始语料标注类别的结果,将标注有类别的初始语料作为训练样本对机器学习模型进行训练。可以根据建立的机器学习模型类型,选取相应的方法进行训练。
步骤207,验证机器学习模型。获取验证语料集合,使用机器学习模型对验证语料集合进行分类检验,获取验证语料集合中验证语料的类别。确定分类检验的成功率,判断成功率是否低于预设的阈值,如果是,则提示用户输入新的初始语料集合,将新的初始语料作为新的训练样本,继续对机器学习模型进行训练,即重复步骤202-206。
步骤208,部署机器学习模型。如果使用机器学习模型对验证语料集合进行分类检验的成功率高于阈值,则停止对机器学习模型进行训练。如果用户需要部署机器人,通过人机界面进行设置。接收用户设置的与类别相对应的应答信息,例如,对于“退货”类别设置相关的退货政策信息作为应答信息。并设置与机器学习模型对应的机器人对话入口。
机器学习模型的训练、部署由系统自动完成,通过语料及标注结果训练机器学习模型,采用的机器学习算法有逻辑回归、支持向量机等。机器学习模型训练完成后需由系统自动对其分类的准确率进行估测,准确率高于阈值时,机器学习模型才可上线,低于阈值则需增加样本或修改标注重新训练。
图3为示出根据本公开一些实施例的对话机器人生成方法中的机器学习模型生成应答的流程示意图,如图3所示,机器学习模型生成应答的流程包括步骤301-307。
步骤301,确定文字信息对应的机器人入口。接收到用户输入的文字信息,确定与文字信息相对应的机器人入口,并将文字信息发送至机器人入口。
例如,对于一个系统可能会有多个机器人,每个机器人会有多个入口。以电商网站为例,商品页、订单页、售后页等都会有客服机器人图标,点击这些图标便可咨询客服机器人。接收到用户的咨询请求后首先要定位用户咨询的机器人及对应入口。
步骤302,对文字信息进行纠错处理。纠错处理是纠正用户咨询的文字信息里的错别字或错误语法。
步骤303,对文字信息进行分词处理。分词处理是基于分词算法将用户的文字信息分成独立的词。
步骤304,对进行分词处理后的文字信息进行特征词提取,构造文字信息的语义向量。在分词之后得到的集合中,会发现一些无效词,可以被排除。也可以识别出文字信息里特定的实体,如手机号实体,长度实体等。构造文字信息的语义向量是构造在向量空间的向量,即文本向量空间模型中的向量,将文字信息转换为二进制表示,以便进行分类。
步骤306,将语义向量输入机器人入口对应的机器学习模型。
步骤307,机器学习模型基于语义向量确定文字信息的类别,获取与类别相对应的应答信息。机器学习模型采用向量空间模型进行分类,将语义向量与向量空间模型的已知类 别的向量进行比对,采用向量夹角距离,向量内积或者欧几里得几何距离判定相似度,获取最相似的已知类别的向量,即确定用户输入的文字信息的类别。
机器学习模型可以进行意图识别,即用构造的机器学习模型对文字信息转换而成的向量进行分类,识别用户问话对应的类别,而后用应答引擎给出对应的回答。例如,机器学习模型生成应答的过程如下所示:
用户问:“我要退货”。对文本信息“我要退货”进行纠错:无错误,不需纠正。对文本信息“我要退货”进行分词处理的结果为:转换为“我|要|退货”。进行实体识别:无要识别的实体。构造向量空间:在分词基础上再对用户问话进行切分,如切换为“我|我要|要|要退|退|退货|货”,假设机器人词库有一万个字词,则词库可理解为一个具有一万个字词的数组,“我|我要|要|要退|退|退货|货”包含7个字词,若词库中存在“我”、“我要”等字词,则对应数组元素为1,否则为0。从而用户问话为转换为形如“00000010000…………”的二进制串,此二进制串则为用户问话转换而成的向量。将向量用机器学习模型进行分类,可分类为“退货”,根据“退货”类别预定义的应答策略和信息给出预先设置的答案。
上述实施例中提供的对话机器人生成方法,对用户开放建立和部署对话机器人的功能,机器学习模型的训练和部署由系统自动完成,用户无需编程便可自动建立机器学习模型并能够利用机器学习模型进行应答,提高了用户建立和部署对话机器人的效率。
在一个实施例中,本公开提供一种对话机器人生成装置40,包括:模型确定模块41、模型训练模块42、模型部署模块43和运行控制模块44。模型确定模块41基于用户输入的机器人建立指令确定所需创建的机器学习模型。模型训练模块42接收用户输入的初始语料集合,将初始语料集合作为训练样本对机器学习模型进行训练。
模型部署模块43基于用户输入的机器人部署指令获取训练好的机器学习模型进行部署,入口设置模块44设置与机器学习模型对应的机器人对话入口。运行控制模块45接收到用户输入的对话交互信息,将对话交互信息输入与机器人对话入口相对应的机器学习模型,以使机器学习模型生成应答信息。
如图5所示,模型训练模块42包括:语料分类单元421、标注提示单元422和样本训练单元423。语料分类单元421基于初始语料集合中的初始语料进行分类训练,获取用于判定初始语料的类别的分类规则。标注提示单元422向用户显示分类规则,以使用户基于分类规则对初始语料进行分类,并对初始语料标注类别。样本训练单元423接收到用户提交的对初始语料标注类别的结果,将标注有类别的初始语料作为训练样本对机器学习模型 进行训练。
语料分类单元421提取初始语料的特征信息,并利用特征上下位和/或特征同义词关系对特征信息进行泛化处理。语料分类单元421对泛化处理后的特征信息进行聚类处理,用以获取初始语料的聚类结果。语料分类单元421融合聚类结果得到初始语料的分类结果,基于分类结果建立分类规则。
样本训练单元423获取验证语料集合,使用机器学习模型对验证语料集合进行分类检验,获取验证语料集合中验证语料的类别。样本训练单元423确定分类检验的成功率,判断成功率是否低于预设的阈值。如果是,则样本训练单元423提示用户输入新的初始语料集合,将新的初始语料作为新的训练样本,用以继续对机器学习模型进行训练。
如果成功率高于阈值,则样本训练单元423停止对机器学习模型进行训练。样本训练单元423接收用户设置的与类别相对应的应答信息,并在机器学习模型中设置类别与应答信息的对应关系。
如图6所示,运行控制模块45包括:入口确定单元451、文本处理单元452和应答生成单元453。入口确定单元451接收用户输入的文字信息,确定与文字信息相对应的机器人入口,并将文字信息发送至机器人入口。文本处理单元452对文字信息进行纠错处理,并对文字信息进行分词处理,对进行分词处理后的文字信息进行特征词提取,构造文字信息的语义向量。应答生成单元453将语义向量输入机器人入口对应的机器学习模型,以使机器学习模型基于语义向量确定文字信息的类别,获取与类别相对应的应答信息。
图7为根据本公开的对话机器人生成装置的另一个实施例的模块示意图。如图7所示,该装置可包括存储器71、处理器72、通信接口73以及总线74。存储器71用于存储指令,处理器72耦合到存储器71,处理器72被配置为基于存储器71存储的指令执行实现上述的对话机器人生成方法。
存储器71可以为高速RAM存储器、非易失性存储器(non-volatile memory)等,存储器71也可以是存储器阵列。存储器71还可能被分块,并且块可按一定的规则组合成虚拟卷。处理器72可以为中央处理器CPU,或专用集成电路ASIC(Application Specific Integrated Circuit),或者是被配置成实施本公开的对话机器人生成方法的一个或多个集成电路。
本公开还提供一种计算机可读存储介质,其中计算机可读存储介质存储有计算机指令,指令被处理器执行时实现任一实施例所涉及的方法。本领域内的技术人员应明白,本公开的实施例可提供为方法、装置、或计算机程序产品。因此,本公开可采用 完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用非瞬时性存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式
上述实施例中提供的对话机器人自动生成方法及装置,对用户开放建立和部署对话机器人的功能,机器学习模型的训练和部署由系统自动完成,用户无需编程便可自动建立机器学习模型并能够利用机器学习模型进行应答,提高了用户建立和部署对话机器人的效率,并且基于机器学习模型能够快速、准确地生成应答信息,提升了用户体验。
本领域内的技术人员应明白,本公开的实施例可提供为方法、系统、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个其中包含有计算机可用程序代码的计算机可用非瞬时性存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本公开是参照根据本公开实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
最后应当说明的是:以上实施例仅用以说明本公开的技术方案而非对其限制;尽管参照较佳实施例对本公开进行了详细的说明,所属领域的普通技术人员应当理解: 依然可以对本公开的具体实施方式进行修改或者对部分技术特征进行等同替换;而不脱离本公开技术方案的精神,其均应涵盖在本公开请求保护的技术方案范围当中

Claims (15)

  1. 一种对话机器人生成方法,包括:
    确定步骤,基于用户输入的机器人建立指令确定所需创建的机器学习模型;
    训练步骤,将来自用户的初始语料集合作为训练样本对所述机器学习模型进行训练;
    部署步骤,基于用户输入的机器人部署指令获取训练好的所述机器学习模型进行部署;
    设置步骤,设置与所述机器学习模型对应的机器人对话入口;以及
    输入步骤,将来自用户的对话交互信息输入与所述机器人对话入口相对应的所述机器学习模型,以使所述机器学习模型生成应答信息。
  2. 如权利要求1所述的方法,所述将来自用户的初始语料集合作为训练样本对所述机器学习模型进行训练包括:
    基于所述初始语料集合中的初始语料进行分类训练,用以得到用于判定所述初始语料的类别的分类规则;
    向用户显示所述分类规则,以使用户基于所述分类规则对所述初始语料标注类别;
    根据用户提交的对所述初始语料标注类别的结果,将标注有类别的初始语料作为训练样本对所述机器学习模型进行训练。
  3. 如权利要求2所述的方法,所述基于所述初始语料集合中的初始语料进行分类训练、用以得到用于判定所述初始语料的类别的分类规则包括:
    提取所述初始语料的特征信息;
    利用特征上下位和特征同义词关系中的至少一个对所述特征信息进行泛化处理;
    对泛化处理后的所述特征信息进行聚类处理,用以得到所述初始语料的聚类结果;
    融合所述聚类结果得到所述初始语料的分类结果;
    基于所述分类结果建立所述分类规则。
  4. 如权利要求3所述的方法,在将所述初始语料集合作为训练样本对所述机器学习模型进行训练之后还包括:
    使用所述机器学习模型对验证语料集合进行分类检验;
    将所述分类检验的成功率与阈值进行比较;
    在所述成功率低于所述阈值的情况下,提示用户输入新的初始语料集合,用以继续对所述机器学习模型进行训练。
  5. 如权利要求4所述的方法,还包括:
    在所述成功率高于所述阈值的情况下,停止对所述机器学习模型进行训练;
    接收用户设置的与所述初始语料的类别相对应的应答信息;
    在所述机器学习模型中设置所述初始语料的类别与所述应答信息的对应关系。
  6. 如权利要求5所述的方法,所述将用户输入的对话交互信息输入与所述机器人对话入口相对应的所述机器学习模型包括:
    将用户输入的文字信息发送到与此文字信息相对应的机器人入口;
    对所述文字信息进行纠错处理;
    对进行所述纠错处理后的所述文字信息进行分词处理;
    对进行所述分词处理后的文字信息进行特征词提取;
    基于所述特征词构造所述文字信息的语义向量;
    将所述语义向量输入所述机器人入口对应的所述机器学习模型,以使所述机器学习模型基于所述语义向量确定所述文字信息的类别,用以得到与此类别相对应的应答信息。
  7. 如权利要求2所述的方法,其中,
    所述机器人包括:客服机器人,所述类别包括退货、付款、购买中的至少一种。
  8. 一种对话机器人生成装置,包括:
    模型确定模块,用于基于用户输入的机器人建立指令确定所需创建的机器学习模型;
    模型训练模块,用于将来自用户的初始语料集合作为训练样本对所述机器学习模型进行训练;
    模型部署模块,用于基于用户输入的机器人部署指令获取训练好的所述机器学习模型进行部署;
    入口设置模块,用于设置与所述机器学习模型对应的机器人对话入口;
    运行控制模块,用于将来自用户的对话交互信息输入与所述机器人对话入口相对应的所述机器学习模型,以使所述机器学习模型生成应答信息。
  9. 如权利要求8所述的装置,其中,
    所述模型训练模块,包括:
    语料分类单元,用于基于所述初始语料集合中的初始语料进行分类训练,用以得到用于判定所述初始语料的类别的分类规则;
    标注提示单元,用于向用户显示所述分类规则,以使用户基于所述分类规则对所述初始语料标注类别;
    样本训练单元,用于根据用户提交的对所述初始语料标注类别的结果,将标注有类别的初始语料作为训练样本对所述机器学习模型进行训练。
  10. 如权利要求9所述的装置,其中,
    所述语料分类单元,还用于提取所述初始语料的特征信息;利用特征上下位和特征同义词关系中的至少一个对所述特征信息进行泛化处理;对泛化处理后的所述特征信息进行聚类处理,用以得到所述初始语料的聚类结果;融合所述聚类结果得到所述初始语料的分类结果;基于所述分类结果建立所述分类规则。
  11. 如权利要求10所述的装置,其中,
    所述样本训练单元,还用于使用所述机器学习模型对验证语料集合进行分类检验;将所述分类检验的成功率与阈值进行比较;在所述成功率低于所述阈值的情况下,提示用户输入新的初始语料集合;将所述新的初始语料作为新的训练样本,用以继续对所述机器学习模型进行训练。
  12. 如权利要求11所述的装置,其中,
    所述样本训练单元,还用于在所述成功率高于所述阈值的情况下,停止对所述机器学习模型进行训练;接收用户设置的与所述初始语料的类别相对应的应答信息;在所述机器学习模型中设置此类别与所述应答信息的对应关系。
  13. 如权利要求12所述的装置,其中,
    所述运行控制模块,还包括:
    入口确定单元,用于将用户输入的文字信息发送到与此文字信息相对应的机器人入口;
    文本处理单元,用于对所述文字信息进行纠错处理;对进行所述纠错处理后的所述文字信息进行分词处理;对进行所述分词处理后的文字信息进行特征词提取;基于所述特征词构造所述文字信息的语义向量;
    应答生成单元,用于将所述语义向量输入所述机器人入口对应的所述机器学习模型,以使所述机器学习模型基于所述语义向量确定所述文字信息的类别,用以得到与所述类别相对应的应答信息。
  14. 一种对话机器人生成装置,包括:
    存储器;以及耦接至所述存储器的处理器,所述处理器被配置为基于存储在所述存储器中的指令,执行如权利要求1至7中任一项所述的对话机器人生成方法。
  15. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机指令,所述指令被处理器执行如权利要求1至7中任一项所述的对话机器人生成方法。
PCT/CN2018/083836 2017-04-24 2018-04-20 对话机器人生成方法及装置 WO2018196684A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710270940.6 2017-04-24
CN201710270940.6A CN108733722B (zh) 2017-04-24 2017-04-24 一种对话机器人自动生成方法及装置

Publications (1)

Publication Number Publication Date
WO2018196684A1 true WO2018196684A1 (zh) 2018-11-01

Family

ID=63918049

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/083836 WO2018196684A1 (zh) 2017-04-24 2018-04-20 对话机器人生成方法及装置

Country Status (2)

Country Link
CN (1) CN108733722B (zh)
WO (1) WO2018196684A1 (zh)

Cited By (24)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110020889A (zh) * 2019-03-15 2019-07-16 阿里巴巴集团控股有限公司 用户接入方法、装置及设备
CN110209811A (zh) * 2019-04-30 2019-09-06 上海艾瑞市场咨询股份有限公司 一种商品自动分类方法及系统
CN110347797A (zh) * 2019-07-10 2019-10-18 广州市百果园信息技术有限公司 文本信息的侦测方法、系统、设备及存储介质
CN110765776A (zh) * 2019-10-11 2020-02-07 阳光财产保险股份有限公司 回访标注样本数据的生成方法及装置
CN110889268A (zh) * 2019-10-30 2020-03-17 中盈优创资讯科技有限公司 报表生成方法及装置
CN110889070A (zh) * 2019-11-14 2020-03-17 深圳小蛙出海科技有限公司 一种内容推送方法、计算机装置及系统
CN110941701A (zh) * 2019-11-27 2020-03-31 珠海格力电器股份有限公司 语义分析样本集的优化方法、存储介质和计算设备
CN111382569A (zh) * 2018-12-27 2020-07-07 深圳市优必选科技有限公司 对话语料中实体的识别方法、装置和计算机设备
CN111428023A (zh) * 2020-03-26 2020-07-17 支付宝(杭州)信息技术有限公司 话术推荐方法、装置和电子设备
CN111435449A (zh) * 2018-12-26 2020-07-21 深圳市优必选科技有限公司 模型的自训练方法、装置、计算机设备及存储介质
CN111538810A (zh) * 2020-04-22 2020-08-14 斑马网络技术有限公司 数据生成方法、装置、电子设备及存储介质
CN111680514A (zh) * 2019-02-25 2020-09-18 北京猎户星空科技有限公司 信息处理和模型训练方法、装置、设备及存储介质
CN111859096A (zh) * 2019-04-19 2020-10-30 北京嘀嘀无限科技发展有限公司 信息推送装置、方法、电子设备及计算机可读存储介质
CN112035659A (zh) * 2020-08-12 2020-12-04 北京字节跳动网络技术有限公司 数据处理方法及装置
CN112131368A (zh) * 2020-09-27 2020-12-25 平安国际智慧城市科技股份有限公司 对话生成方法、装置、电子设备及存储介质
CN112487179A (zh) * 2019-09-11 2021-03-12 珠海格力电器股份有限公司 一种口语语义理解方法、装置及系统
CN112686674A (zh) * 2020-12-25 2021-04-20 科讯嘉联信息技术有限公司 一种客服对话工单总结方法
CN112749565A (zh) * 2019-10-31 2021-05-04 华为终端有限公司 基于人工智能的语义识别方法、装置和语义识别设备
CN112951429A (zh) * 2021-03-25 2021-06-11 浙江连信科技有限公司 用于中小学生心理危机筛查的信息处理方法及装置
CN113012788A (zh) * 2021-02-08 2021-06-22 浙江连信科技有限公司 用于戒毒人员的心理干预方法及装置
CN113641807A (zh) * 2021-07-28 2021-11-12 北京百度网讯科技有限公司 对话推荐模型的训练方法、装置、设备和存储介质
CN113761136A (zh) * 2020-06-02 2021-12-07 阿里巴巴集团控股有限公司 对话处理、信息处理、模型训练方法、设备及存储介质
CN117592489A (zh) * 2023-11-30 2024-02-23 北京快牛智营科技有限公司 一种利用大语言模型实现电商商品信息交互的方法及系统
CN113641807B (zh) * 2021-07-28 2024-05-24 北京百度网讯科技有限公司 对话推荐模型的训练方法、装置、设备和存储介质

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111477231B (zh) * 2019-01-24 2023-12-01 科沃斯商用机器人有限公司 人机交互方法、装置和存储介质
CN109977202A (zh) * 2019-03-06 2019-07-05 北京西屋信维科技发展有限公司 一种智能客服系统及其控制方法
CN111767737A (zh) * 2019-05-30 2020-10-13 北京京东尚科信息技术有限公司 文本意图相似度确定方法、装置、电子设备和存储介质
CN110472008B (zh) * 2019-07-04 2023-04-18 创新先进技术有限公司 智能交互方法以及装置
CN110674129A (zh) * 2019-08-14 2020-01-10 平安科技(深圳)有限公司 异常事件处理方法、系统、计算机设备及存储介质
CN111178489B (zh) * 2019-12-30 2021-02-19 深圳集智数字科技有限公司 一种对话机器人引擎流量分配方法及装置
CN111400466A (zh) * 2020-03-05 2020-07-10 中国工商银行股份有限公司 一种基于强化学习的智能对话方法及装置
CN111508488A (zh) * 2020-04-13 2020-08-07 江苏止芯科技有限公司 一种机器人智能对话系统
CN112035650A (zh) * 2020-09-07 2020-12-04 贝壳技术有限公司 信息处理方法、装置、计算机可读存储介质及电子设备
CN113300939A (zh) * 2021-04-26 2021-08-24 国家计算机网络与信息安全管理中心 即时通讯软件交互机器人的开发方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068661A (zh) * 2015-09-07 2015-11-18 百度在线网络技术(北京)有限公司 基于人工智能的人机交互方法和系统
CN105787560A (zh) * 2016-03-18 2016-07-20 北京光年无限科技有限公司 基于循环神经网络的对话数据交互处理方法及装置
CN106294726A (zh) * 2016-08-09 2017-01-04 北京光年无限科技有限公司 基于机器人角色交互的处理方法及装置
CN106295792A (zh) * 2016-08-05 2017-01-04 北京光年无限科技有限公司 基于多模型输出的对话数据交互处理方法及装置
CN106469212A (zh) * 2016-09-05 2017-03-01 北京百度网讯科技有限公司 基于人工智能的人机交互方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105550746B (zh) * 2015-12-08 2018-02-02 北京旷视科技有限公司 机器学习模型的训练方法和训练装置
CN106297789B (zh) * 2016-08-19 2020-01-14 北京光年无限科技有限公司 智能机器人的个性化交互方法及交互系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105068661A (zh) * 2015-09-07 2015-11-18 百度在线网络技术(北京)有限公司 基于人工智能的人机交互方法和系统
CN105787560A (zh) * 2016-03-18 2016-07-20 北京光年无限科技有限公司 基于循环神经网络的对话数据交互处理方法及装置
CN106295792A (zh) * 2016-08-05 2017-01-04 北京光年无限科技有限公司 基于多模型输出的对话数据交互处理方法及装置
CN106294726A (zh) * 2016-08-09 2017-01-04 北京光年无限科技有限公司 基于机器人角色交互的处理方法及装置
CN106469212A (zh) * 2016-09-05 2017-03-01 北京百度网讯科技有限公司 基于人工智能的人机交互方法和装置

Cited By (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111435449A (zh) * 2018-12-26 2020-07-21 深圳市优必选科技有限公司 模型的自训练方法、装置、计算机设备及存储介质
CN111435449B (zh) * 2018-12-26 2024-04-02 深圳市优必选科技有限公司 模型的自训练方法、装置、计算机设备及存储介质
CN111382569B (zh) * 2018-12-27 2024-05-03 深圳市优必选科技有限公司 对话语料中实体的识别方法、装置和计算机设备
CN111382569A (zh) * 2018-12-27 2020-07-07 深圳市优必选科技有限公司 对话语料中实体的识别方法、装置和计算机设备
CN111680514A (zh) * 2019-02-25 2020-09-18 北京猎户星空科技有限公司 信息处理和模型训练方法、装置、设备及存储介质
CN111680514B (zh) * 2019-02-25 2024-03-01 北京猎户星空科技有限公司 信息处理和模型训练方法、装置、设备及存储介质
CN110020889A (zh) * 2019-03-15 2019-07-16 阿里巴巴集团控股有限公司 用户接入方法、装置及设备
CN110020889B (zh) * 2019-03-15 2022-12-27 创新先进技术有限公司 用户接入方法、装置及设备
CN111859096B (zh) * 2019-04-19 2024-04-19 北京嘀嘀无限科技发展有限公司 信息推送装置、方法、电子设备及计算机可读存储介质
CN111859096A (zh) * 2019-04-19 2020-10-30 北京嘀嘀无限科技发展有限公司 信息推送装置、方法、电子设备及计算机可读存储介质
CN110209811B (zh) * 2019-04-30 2023-09-22 上海艾瑞数科商务咨询有限公司 一种商品自动分类方法及系统
CN110209811A (zh) * 2019-04-30 2019-09-06 上海艾瑞市场咨询股份有限公司 一种商品自动分类方法及系统
CN110347797A (zh) * 2019-07-10 2019-10-18 广州市百果园信息技术有限公司 文本信息的侦测方法、系统、设备及存储介质
CN112487179B (zh) * 2019-09-11 2024-05-31 珠海格力电器股份有限公司 一种口语语义理解方法、装置及系统
CN112487179A (zh) * 2019-09-11 2021-03-12 珠海格力电器股份有限公司 一种口语语义理解方法、装置及系统
CN110765776A (zh) * 2019-10-11 2020-02-07 阳光财产保险股份有限公司 回访标注样本数据的生成方法及装置
CN110765776B (zh) * 2019-10-11 2024-05-10 阳光财产保险股份有限公司 回访标注样本数据的生成方法及装置
CN110889268B (zh) * 2019-10-30 2024-04-23 中盈优创资讯科技有限公司 报表生成方法及装置
CN110889268A (zh) * 2019-10-30 2020-03-17 中盈优创资讯科技有限公司 报表生成方法及装置
CN112749565A (zh) * 2019-10-31 2021-05-04 华为终端有限公司 基于人工智能的语义识别方法、装置和语义识别设备
CN110889070A (zh) * 2019-11-14 2020-03-17 深圳小蛙出海科技有限公司 一种内容推送方法、计算机装置及系统
CN110889070B (zh) * 2019-11-14 2023-06-30 深圳小蛙出海科技有限公司 一种内容推送方法、计算机装置及系统
CN110941701A (zh) * 2019-11-27 2020-03-31 珠海格力电器股份有限公司 语义分析样本集的优化方法、存储介质和计算设备
CN110941701B (zh) * 2019-11-27 2023-02-28 珠海格力电器股份有限公司 语义分析样本集的优化方法、存储介质和计算设备
CN111428023A (zh) * 2020-03-26 2020-07-17 支付宝(杭州)信息技术有限公司 话术推荐方法、装置和电子设备
CN111428023B (zh) * 2020-03-26 2023-07-14 支付宝(杭州)信息技术有限公司 话术推荐方法、装置和电子设备
CN111538810A (zh) * 2020-04-22 2020-08-14 斑马网络技术有限公司 数据生成方法、装置、电子设备及存储介质
CN111538810B (zh) * 2020-04-22 2024-04-09 斑马网络技术有限公司 数据生成方法、装置、电子设备及存储介质
CN113761136A (zh) * 2020-06-02 2021-12-07 阿里巴巴集团控股有限公司 对话处理、信息处理、模型训练方法、设备及存储介质
CN112035659A (zh) * 2020-08-12 2020-12-04 北京字节跳动网络技术有限公司 数据处理方法及装置
CN112131368A (zh) * 2020-09-27 2020-12-25 平安国际智慧城市科技股份有限公司 对话生成方法、装置、电子设备及存储介质
CN112131368B (zh) * 2020-09-27 2024-02-09 深圳平安智慧医健科技有限公司 对话生成方法、装置、电子设备及存储介质
CN112686674A (zh) * 2020-12-25 2021-04-20 科讯嘉联信息技术有限公司 一种客服对话工单总结方法
CN113012788A (zh) * 2021-02-08 2021-06-22 浙江连信科技有限公司 用于戒毒人员的心理干预方法及装置
CN113012788B (zh) * 2021-02-08 2024-02-13 浙江连信科技有限公司 用于戒毒人员的心理干预方法及装置
CN112951429A (zh) * 2021-03-25 2021-06-11 浙江连信科技有限公司 用于中小学生心理危机筛查的信息处理方法及装置
CN113641807A (zh) * 2021-07-28 2021-11-12 北京百度网讯科技有限公司 对话推荐模型的训练方法、装置、设备和存储介质
CN113641807B (zh) * 2021-07-28 2024-05-24 北京百度网讯科技有限公司 对话推荐模型的训练方法、装置、设备和存储介质
CN117592489A (zh) * 2023-11-30 2024-02-23 北京快牛智营科技有限公司 一种利用大语言模型实现电商商品信息交互的方法及系统
CN117592489B (zh) * 2023-11-30 2024-05-17 北京快牛智营科技有限公司 一种利用大语言模型实现电商商品信息交互的方法及系统

Also Published As

Publication number Publication date
CN108733722A (zh) 2018-11-02
CN108733722B (zh) 2020-07-31

Similar Documents

Publication Publication Date Title
WO2018196684A1 (zh) 对话机器人生成方法及装置
US10847139B1 (en) Crowd sourced based training for natural language interface systems
US11568855B2 (en) System and method for defining dialog intents and building zero-shot intent recognition models
US9081411B2 (en) Rapid development of virtual personal assistant applications
WO2021042904A1 (zh) 会话意图识别方法、装置、计算机设备和存储介质
US9489625B2 (en) Rapid development of virtual personal assistant applications
US20200184307A1 (en) Utilizing recurrent neural networks to recognize and extract open intent from text inputs
CN106649825B (zh) 语音交互系统及其创建方法和装置
CN111708869B (zh) 人机对话的处理方法及装置
US10783877B2 (en) Word clustering and categorization
US20190340503A1 (en) Search system for providing free-text problem-solution searching
WO2013010262A1 (en) Method and system of classification in a natural language user interface
US20200380964A1 (en) Systems and methods for automactically categorizing unstructured data and improving a machine learning-based dialogue system
CN114945914A (zh) 引用表达生成
US20060155673A1 (en) Method and apparatus for robust input interpretation by conversation systems
CN113590798A (zh) 对话意图识别、用于识别对话意图的模型的训练方法
CN110489517B (zh) 虚拟助理的自动学习方法及系统
TWI674530B (zh) 操作虛擬助理的方法及系統
WO2023124215A1 (zh) 用户问题的标注方法及装置
CN114546326A (zh) 一种虚拟人手语生成方法和系统
TWI679548B (zh) 虛擬助理的自動學習方法及系統
CN111046151B (zh) 一种消息处理方法及装置
KR20210093793A (ko) 시각장애인용 키오스크 장치 및 이의 동작방법
CN113836932A (zh) 交互方法、装置和系统,以及智能设备
US20240127026A1 (en) Shallow-deep machine learning classifier and method

Legal Events

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

Ref document number: 18789924

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

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

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 04/02/2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18789924

Country of ref document: EP

Kind code of ref document: A1