A virtual welcoming robot and robot interaction method thereof

Through the interactive processing device of the virtual welcome robot, the knowledge generation and question-and-answer models are used to process users' non-standard questions, solving the accuracy of dialogue information processing, and improving the interaction satisfaction and credibility of answers.

CN118656458BActive Publication Date: 2024-12-13SHENZHEN YUNJING VISION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410677780.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-12-13
Estimated Expiration
2044-05-28

AI Technical Summary

Technical Problem

When existing virtual welcome robots handle user irregular business questions, it is difficult to ensure the accuracy and fluency of conversation information, resulting in low interaction satisfaction.

Method used

Adopt interactive processing devices, including dialogue problem acquisition module, knowledge prediction module, dialogue content acquisition module and reply content prediction module, through knowledge generation model and question-answer model, high-quality knowledge information is automatically obtained and generated to improve the accuracy of dialogue content and Explanatory.

Benefits of technology

It improves the interaction satisfaction between users and robots during robot interaction, and through high-quality knowledge and information processing, convenient and efficient answer prediction is achieved, improving the accuracy and credibility of the conversation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656458B_ABST
    Figure CN118656458B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of artificial intelligence technology, and provides a virtual welcoming robot and a robot interaction method thereof, including an interactive device, an interactive processing device and a sliding device; the interactive processing device includes an interactive middle station, a dialogue question acquisition module, a knowledge prediction module, a dialogue content acquisition module and a reply content prediction module; the interactive middle station is respectively connected to the dialogue question acquisition module, the knowledge prediction module, the dialogue content acquisition module and the reply content prediction module; the interactive dialogue question of the target user is obtained; the interactive dialogue question is input into a knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question; according to the interactive dialogue question and each dimension of target knowledge information, the target dialogue content is obtained; the target dialogue content is input into a question-answering model to obtain the target reply content corresponding to the interactive dialogue question; and the target reply content is fed back to the target user. The present invention improves the interaction satisfaction between the user and the robot during the robot interaction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a virtual welcoming robot and a robot interaction method thereof. Background Art

[0002] With the continuous development and progress of science and technology, more and more companies are communicating with target users through the virtual reception robots they have built. When the target user has business questions but cannot clearly express the business demands through a question, they often have multiple rounds of dialogue with the virtual reception robot. At this time, the virtual reception robot can identify the problem demands of each question of the target user one by one based on the slot management method, and when it is determined that a certain question is missing slot information, it can identify the problem demands and give a response after a smooth dialogue by instructing the target user to supplement the operation information. However, since the slot management method is only applicable to controllable business scenarios where the target user's questions are relatively standardized and the business process is clearly divided, the scope of application is limited and the processing process is cumbersome. It is difficult to control the accuracy of the business during the entire dialogue information processing process, resulting in low accuracy in processing dialogue information. Summary of the invention

[0003] The present invention provides a virtual welcoming robot and a robot interaction method thereof, which are used to improve the interaction satisfaction between a user and the robot during the robot interaction process.

[0004] The technical solution of the present invention to solve the above technical problems is as follows:

[0005] A virtual welcoming robot comprises an interactive device, an interactive processing device and a sliding device, wherein the interactive processing device is connected and communicated with the interactive device; the interactive device comprises an interactive display module and / or a voice broadcast module; the interactive processing device comprises an interactive middle platform, a dialogue question acquisition module, a knowledge prediction module, a dialogue content acquisition module and a reply content prediction module; the interactive middle platform is respectively connected to the dialogue question acquisition module, the knowledge prediction module, the dialogue content acquisition module and the reply content prediction module, and is used to store and manage data of each module; the sliding device comprises a universal wheel or a sliding crawler, which is used to control the movement of the virtual welcoming robot;

[0006] A dialogue question acquisition module is used to obtain interactive dialogue questions of target users;

[0007] A knowledge prediction module, used for inputting the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question;

[0008] A dialogue content acquisition module, used to acquire target dialogue content according to the interactive dialogue question and the target knowledge information of each dimension;

[0009] A reply content prediction module, used to input the target dialogue content into the question-answering model to obtain the target reply content corresponding to the interactive dialogue question;

[0010] The interactive device is used to feed back the target reply content to the target user;

[0011] Among them, the knowledge generation model is obtained by training a small language model based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question; the question-answering model is obtained by training the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, and the answer label of the sample question; the first candidate question is generated based on the first knowledge tuple in the knowledge base; the second candidate question is generated based on the first candidate question and the second knowledge tuple in the knowledge base; the first sample knowledge information is converted based on the first knowledge tuple; the second sample knowledge information is obtained by learning the prompt information of the second candidate question through a large language model; the first knowledge tuple includes knowledge tuples associated with the sample question; the second knowledge tuple includes knowledge tuples that have the same relationship entity, different question entities and different answer entities as the first knowledge tuple.

[0012] The present invention also provides a robot interaction method, comprising:

[0013] Obtain interactive dialogue questions from target users;

[0014] Inputting the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question;

[0015] Acquire target dialogue content according to the interactive dialogue question and the target knowledge information of each dimension;

[0016] Inputting the target dialogue content into the question-answering model to obtain the target response content corresponding to the interactive dialogue question;

[0017] Feedback the target reply content to the target user;

[0018] Among them, the knowledge generation model is obtained by training a small language model based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question; the question-answering model is obtained by training the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, and the answer label of the sample question; the first candidate question is generated based on the first knowledge tuple in the knowledge base; the second candidate question is generated based on the first candidate question and the second knowledge tuple in the knowledge base; the first sample knowledge information is converted based on the first knowledge tuple; the second sample knowledge information is obtained by learning the prompt information of the second candidate question through a large language model; the first knowledge tuple includes knowledge tuples associated with the sample question; the second knowledge tuple includes knowledge tuples that have the same relationship entity, different question entities and different answer entities as the first knowledge tuple.

[0019] According to the robot interaction method provided by the present invention, the first candidate question is obtained based on the following steps:

[0020] Extracting the first knowledge tuple from the knowledge base;

[0021] Determining a target verbalization template according to the relationship type of the relationship entity in the first knowledge tuple;

[0022] According to the target verbalization template, the question entity and the relationship entity in the first knowledge tuple are converted into the first candidate question.

[0023] According to the robot interaction method provided by the present invention, the second candidate question is obtained based on the following steps:

[0024] Extracting at least one of the second knowledge tuples from the knowledge base;

[0025] The second candidate question is synthesized according to the first candidate question, the answer entity in the first knowledge tuple, and the answer entity in each of the second knowledge tuples.

[0026] According to the robot interaction method provided by the present invention, the second sample knowledge information is obtained based on the following steps:

[0027] Inputting the second candidate questions into the large language model to obtain multi-dimensional candidate knowledge information corresponding to each of the second candidate questions and target reply content corresponding to each dimension of the candidate knowledge information;

[0028] Perform consistency calculation according to the target response content corresponding to the candidate knowledge information in each dimension and the answer label of the sample question to obtain the consistency score corresponding to the candidate knowledge information in each dimension;

[0029] Predicting, based on the second candidate question, adding sample change information of the target reply content before and after the candidate knowledge information of each dimension;

[0030] According to the sample change information, obtaining the benefit score corresponding to the candidate knowledge information in each dimension;

[0031] The second sample knowledge information is obtained from the multi-dimensional candidate knowledge information according to the consistency score and the benefit score.

[0032] According to the robot interaction method provided by the present invention, the training step of the knowledge generation model includes:

[0033] Based on the first candidate question and the first sample knowledge information, pre-training the small language model to obtain a pre-trained knowledge model;

[0034] Based on the second candidate question and the second sample knowledge information, the pre-trained knowledge model is trained to obtain the knowledge generation model.

[0035] According to the robot interaction method provided by the present invention, the method further includes:

[0036] Inputting the target dialogue content into the question-answering model, predicting and obtaining target change information of the target reply content before and after adding the target knowledge information of each dimension on the basis of the interactive dialogue question;

[0037] According to the target change information, obtaining the benefit score corresponding to the target knowledge information in each dimension;

[0038] The beneficialness score corresponding to the target knowledge information in each dimension is used as a reward value, and the knowledge generation model is used as a strategy network to perform reinforcement learning and update on the knowledge generation model.

[0039] According to the robot interaction method provided by the present invention, the step of obtaining the target dialogue content according to the interactive dialogue question and the target knowledge information of each dimension includes:

[0040] Generate blank knowledge information corresponding to the interactive dialogue question;

[0041] Generate a knowledge set according to the blank knowledge information and at least one dimension of the target knowledge information;

[0042] The interactive dialogue questions are combined with each piece of knowledge information in the knowledge set to obtain the target dialogue content.

[0043] The present invention also provides an electronic device, comprising: a memory for storing a computer software program; a processor for reading and executing the computer software program, thereby implementing any of the above-mentioned robot interaction methods.

[0044] The present invention also provides a non-transitory computer-readable storage medium, characterized in that a computer software program is stored in the storage medium, and when the computer software program is executed by a processor, it implements any of the robot interaction methods described above.

[0045] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the robot interaction method described above is implemented.

[0046] The beneficial effects of the present invention are: automatically synthesizing common sense question and answer data through knowledge tuples in the knowledge base, and supplementing diverse knowledge information by using the prompt learning of a large language model to synthesize the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question, and based on the fusion of the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, a small-sized knowledge generation model that can generate high-quality knowledge information and is easy to deploy and adjust is trained, and the knowledge generation model and the question and answer model are jointly deployed, and for interactive dialogue questions that require common sense question and answer, high-quality multi-dimensional knowledge information is generated based on the knowledge generation model learning, providing high-quality and highly interpretable knowledge basis information for the question and answer model, thereby enabling the question and answer model to conveniently and efficiently predict effective, reliable and high-precision answers, thereby improving the interaction satisfaction between the user and the robot during the robot interaction process. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a structural schematic diagram of the virtual welcoming robot provided by the present invention;

[0048] Figure 2 is a flow chart of the robot interaction method provided by the present invention;

[0049] Figure 3 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0051] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0052] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present invention.

[0053] Optional, see Figure 1 , Figure 1 It is a structural schematic diagram of the virtual welcoming robot provided by the present invention. The virtual welcoming robot comprises an interactive device, an interactive processing device and a sliding device. The interactive processing device is connected and communicated with the interactive device.

[0054] Furthermore, the interactive device includes an interactive display module and / or a voice broadcast module, wherein the interactive display module can be understood as an interactive display interface of the virtual reception robot, and the voice broadcast module can include voice devices such as sound, speakers, and receivers. Therefore, the virtual reception robot can display the corresponding dialogue content on the interactive display interface, and can also broadcast the corresponding dialogue content through the voice broadcast module.

[0055] Furthermore, the interaction processing device includes an interaction middle station, a dialogue question acquisition module, a knowledge prediction module, a dialogue content acquisition module and a reply content prediction module; the interaction middle station is respectively connected to the dialogue question acquisition module, the knowledge prediction module, the dialogue content acquisition module and the reply content prediction module, and is used to store and manage the data of each module.

[0056] Furthermore, the sliding device includes universal wheels or sliding tracks to control the movement of the virtual welcoming robot.

[0057] Furthermore, when the user needs to interact with a question, the user can click a wake-up command on the interactive display interface of the virtual welcome robot, or wake up the virtual welcome robot through voice, such as calling the virtual welcome robot "Xiao X, Xiao X", "Classmate XX", etc.

[0058] Furthermore, the dialogue question acquisition module acquires the interactive dialogue questions of the target user.

[0059] Furthermore, the knowledge prediction module inputs the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question, wherein the knowledge generation model is obtained by training a small language model based on the first candidate question, the second candidate question, the first sample knowledge information, and the second sample knowledge information of the sample question. The first candidate question is generated based on the first knowledge tuple in the knowledge base; the second candidate question is generated based on the first candidate question and the second knowledge tuple in the knowledge base; the first sample knowledge information is obtained by converting the first knowledge tuple; the second sample knowledge information is obtained by learning the prompt information of the second candidate question through the large language model; the first knowledge tuple includes the knowledge tuple associated with the sample question; the second knowledge tuple includes the knowledge tuple that has the same relationship entity, different question entity, and different answer entity as the first knowledge tuple.

[0060] Furthermore, the dialogue content acquisition module acquires the target dialogue content according to the interactive dialogue questions and the target knowledge information of each dimension.

[0061] Furthermore, the reply content prediction module inputs the target dialogue content into the question-answering model to obtain the target reply content corresponding to the interactive dialogue question, wherein the question-answering model is trained based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, and the answer label of the sample question.

[0062] Furthermore, the interactive device feeds back the target reply content to the target user, that is, the virtual welcoming robot displays the target reply content on the interactive display interface, or broadcasts the target reply content through the voice broadcast module.

[0063] The virtual reception robot in the embodiment of the present invention automatically synthesizes common sense question and answer data through knowledge tuples in the knowledge base, and supplements various knowledge information by using the prompt learning of the large language model to synthesize the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question, and trains a small-sized knowledge generation model that can generate high-quality knowledge information and is easy to deploy and adjust based on the fusion of the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, and jointly deploys the knowledge generation model and the question and answer model, and for interactive dialogue questions that require common sense question and answer, generates high-quality multi-dimensional knowledge information based on the knowledge generation model learning, and provides high-quality and highly interpretable knowledge basis information for the question and answer model, thereby enabling the question and answer model to conveniently and efficiently predict effective, reliable and high-precision answers, thereby improving the interaction satisfaction between the user and the robot during the robot interaction process.

[0064] In an alternative embodiment, referring to Figure 2 , Figure 2 It is a flowchart of the robot interaction method provided by the present invention. The execution subject of the robot interaction method is a virtual welcoming robot. The virtual welcoming robot can be set in an electronic device or a server. The electronic device can be a personal computer (PC), a portable device, a laptop, a smart phone, a tablet computer, a portable wearable device and other devices; the server can refer to a server, or a server cluster composed of multiple servers, a cloud server, etc. Further, the robot interaction method can also be applied to a dialogue processing device set in an electronic device or a server. The dialogue processing device can be implemented by software, hardware or a combination of the two. The following describes the robot interaction method by taking the execution subject of the robot interaction method as a virtual welcoming robot as an example.

[0065] The robot interaction method includes the following steps 210 to 250.

[0066] Step 210, obtaining interactive dialogue questions of the target user;

[0067] Step 220: input the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question.

[0068] When the user needs to interact with the virtual reception robot, he can click the wake-up command on the interactive display interface of the virtual reception robot, or wake up the virtual reception robot through voice, such as calling the virtual reception robot "Xiao X, Xiao X", "Classmate XX", etc.

[0069] Optionally, the interactive dialogue questions may also be common sense questions that need to be answered, which may be directly input by the user, or may be obtained by capturing images through image acquisition devices such as scanners, mobile phones, cameras, etc., and performing OCR (Optical Character Recognition) on the images. This embodiment of the present invention does not specifically limit this.

[0070] Therefore, the virtual greeter robot obtains interactive dialogue questions from the target user.

[0071] Furthermore, the virtual reception robot inputs the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question.

[0072] Among them, the knowledge generation model is obtained by training a small language model based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question; the first candidate question is generated according to the first knowledge tuple in the knowledge base; the second candidate question is generated according to the first candidate question and the second knowledge tuple in the knowledge base; the first sample knowledge information is obtained by converting the first knowledge tuple; the second sample knowledge information is obtained by learning the prompt information of the second candidate question through a large language model; the first knowledge tuple includes knowledge tuples associated with the sample question; the second knowledge tuple includes knowledge tuples that have the same relationship entity, different question entities and different answer entities as the first knowledge tuple.

[0073] Optionally, in order to improve the accuracy of common sense question answering, before executing step 220, this embodiment comprehensively utilizes the common sense knowledge base and the common sense question answering data with knowledge information synthesized by the large language model (large language model) to train a small language model (small language model), and trains a small-sized knowledge generation model that is easy to deploy and adjust, so as to provide useful and human-readable knowledge basis for common sense question answering;

[0074] The large language model may be various pre-trained language models with large-scale parameter scales, such as GPT-3 (Generative Pre-trained Transformer 3, third-generation general pre-trained transformer); the small language model is a pre-trained language model with a small-scale parameter scale.

[0075] Among them, the training steps of the knowledge generation model are as follows:

[0076] A large number of sample questions are determined, and knowledge tuples associated with the sample questions are extracted from the knowledge base to obtain a first knowledge tuple, and a first candidate question is synthesized based on the entity information of the first knowledge tuple; wherein the first knowledge tuple is a triplet of knowledge tuples, and a specific format may be (h, r, t), wherein h is a question entity, r is a relationship entity, and t is an answer entity; for example, the first knowledge tuple may be (owl, ability, flying).

[0077] Extract at least one knowledge tuple in the knowledge base that has the same relation entity r as the first knowledge tuple, but with different head entity (question entity) h and tail entity (answer entity) t, as the second knowledge tuple (h′ i , r, t′ i ), and the second candidate question is formed based on the first candidate question and the second knowledge tuple. For the second candidate question, the first knowledge tuple is directly converted into basic form of knowledge information to obtain the first sample knowledge information k source ; For the second candidate question, call the large language model to learn the prompt information to perform diversified and high-quality knowledge information prediction, and obtain the second sample knowledge information k llm Based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question, a small language model is trained to obtain a knowledge generation model of small size that is easy to deploy and adjust and can generate high-quality knowledge information, so as to provide useful and human-readable knowledge information for common sense question answering.

[0078] The training method of the knowledge generation model here can be based on one-stage overall training or multi-stage phased training; for example, taking the first candidate question and the second candidate question as input, taking the first sample knowledge information and the second sample knowledge information as labels, constructing an overall training data set, and performing one-stage overall training on the small language model to obtain the knowledge generation model; for another example, first taking the first candidate question as input, taking the first sample knowledge information as a label, constructing the first-stage training data, and performing the first-stage training on the small language model, then taking the second candidate question as input, taking the second sample knowledge information as a label, constructing the second-stage training data, and performing the second-stage training on the small language model after the first-stage training to obtain the knowledge generation model.

[0079] After the knowledge generation model is acquired through training, the interactive dialogue questions are input into the trained knowledge generation model, so that the knowledge generation model can generate knowledge information for the interactive dialogue questions based on the rich knowledge learned in the knowledge base and the generalized knowledge generation ability learned on the basis of the large language model, thereby obtaining at least one-dimensional target knowledge information.

[0080] Step 230, obtaining the target dialogue content according to the interactive dialogue questions and the target knowledge information of each dimension.

[0081] Optionally, after obtaining the interactive dialogue questions and the target knowledge information of the interactive dialogue questions, the interactive dialogue questions and the target knowledge information of each dimension may be fused so that the target dialogue content input into the question-answering model includes both the question information and the knowledge information, so that the question-answering model can output the correct answer more accurately and efficiently; the fusion may be splicing or encoding, etc., which is not specifically limited in this embodiment.

[0082] Step 240, input the target dialogue content into the question-answering model to obtain the target response content corresponding to the interactive dialogue question.

[0083] The question-answering model is trained based on the first candidate question, the second candidate question, the first sample knowledge information, the second sample knowledge information, and the answer label of the sample question.

[0084] Optionally, before executing step 240, a general question-answering model may be trained based on common sense question-answering data with knowledge information synthesized from a common sense knowledge base and a large language model to train a question-answering model that can accurately output answers. The specific steps include:

[0085] The first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information are used as inputs, and the answer labels of the sample questions are used as labels to train the general question answering model to obtain a question answering model that can accurately output answers based on questions and knowledge. The general question answering model is a language model pre-trained based on general domain question answering data.

[0086] After the question-answering model is obtained through training, the target dialogue content including question information and knowledge information can be input into the question-answering model, so that the question-answering model can answer and output the target reply content corresponding to the interactive dialogue question. The question-answering model can answer in such a way that the question-answering model predicts the probability that each candidate answer (option) belongs to the answer to the interactive dialogue question, finds the maximum predicted probability obtained when splicing knowledge information of different dimensions for each candidate answer as the score of each candidate answer, and finally takes the candidate answer corresponding to the maximum as the final target reply content.

[0087] The question-answering model can answer in the following way: the question-answering model predicts the probability p(a||q, k) that each candidate answer a (option) belongs to the answer to the interactive dialogue question q, and finds the maximum predicted probability obtained by splicing knowledge information k of different dimensions for each candidate answer as the score of each candidate answer, and finally takes the candidate answer corresponding to the maximum probability as the final target reply content. The specific calculation formula is:

[0088]

[0089] Wherein, A and K are an answer set including multiple candidate answers and a knowledge set including multiple knowledge information, respectively. Wherein, the prediction probability can be calculated based on the log-likelihood probability function.

[0090] Step 250: Feedback the target reply content to the target user.

[0091] Furthermore, the virtual welcoming robot displays the target reply content on the interactive display interface, or broadcasts the target reply content through a voice broadcast module.

[0092] This embodiment provides automatic synthesis of common sense question and answer data through knowledge tuples in a knowledge base, and supplements diverse knowledge information by using prompt learning of a large language model to synthesize a first candidate question, a second candidate question, a first sample knowledge information, and a second sample knowledge information of a sample question, and trains a small-sized knowledge generation model that can generate high-quality knowledge information and is easy to deploy and adjust based on the fusion of the first candidate question, the second candidate question, the first sample knowledge information, and the second sample knowledge information, and jointly deploys the knowledge generation model and the question and answer model, and for interactive dialogue questions that require common sense question and answer, generates high-quality multi-dimensional knowledge information based on the knowledge generation model learning, and provides high-quality and highly interpretable knowledge basis information for the question and answer model, thereby enabling the question and answer model to conveniently and efficiently predict effective, reliable, and high-precision answers, thereby improving the interaction satisfaction between the user and the robot during the robot interaction process.

[0093] In some embodiments, the first candidate question is obtained based on the following steps:

[0094] Extracting a first knowledge tuple from a knowledge base;

[0095] Determining a target verbalization template according to a relation type of a relation entity in the first knowledge tuple;

[0096] According to the target verbalization template, the question entity and the relation entity in the first knowledge tuple are converted into a first candidate question.

[0097] Optionally, in order to synthesize common sense question-answering data, a knowledge tuple associated with the sample question can be extracted from the knowledge base as the first knowledge tuple (h, r, t); according to the relationship type of the relationship entity r of the first knowledge tuple, the corresponding target verbalization template is obtained by association; then, according to the target verbalization template, the head entity and the relationship entity (h, r) of the first knowledge tuple are converted into the question stem, that is, the first candidate question And take the tail entity t as the correct answer to the sample question, that is, the answer label a*.

[0098] For example, if the first knowledge tuple (h, r, t) is (owl, ability, flying), then the corresponding first candidate question is Can be "What an Owl Can Do".

[0099] The embodiment of the present invention can ensure the accuracy, consistency, and adaptability of the conversion of each question by automatically converting the ternary knowledge tuples in the knowledge base according to the natural language template, thereby improving the accuracy, flexibility and intelligence of subsequent common sense question answering.

[0100] In some embodiments, the second candidate question is obtained based on the following steps:

[0101] Extracting at least one second knowledge tuple from the knowledge base;

[0102] A second candidate question is synthesized based on the first candidate question, the answer entity in the first knowledge tuple, and the answer entity in each second knowledge tuple.

[0103] Optionally, in order to synthesize more complete and diverse common sense question answering data, several other triples with the same relation entity r as the first knowledge tuple (h, r, t) but with different head and tail entities can be randomly sampled from the knowledge base as the second knowledge tuple (h′ i , r, t′ i ).

[0104] Then, the tail entity t′ of the second knowledge tuple is i As a distractor of the question, the first candidate question (Question stem) is connected with the answer entity in the first knowledge tuple and at least one randomly arranged interference item to automatically synthesize at least one multi-sampled question with options, thereby obtaining a second candidate question q.

[0105] For example, the first candidate question For “what an owl can do”, the answer entity in the first knowledge tuple is flying, and the tail entity of the second knowledge tuple is t′ i For speaking, the second candidate question q is synthesized as "What can an owl do? (A) Fly (B) Talk".

[0106] The embodiment of the present invention can obtain common sense question and answer data samples in a multiple-choice format through the first candidate question, the answer entity in the first knowledge tuple, and the interference term formed by the second knowledge tuple having the same relationship entity r as the first knowledge tuple (h, r, t) but different head entity and tail entity, thereby automatically synthesizing more complete and diversified common sense question and answer data to improve the robustness and accuracy of the question and answer.

[0107] In some embodiments, the step of acquiring the first sample knowledge information includes:

[0108] According to the target verbalization template corresponding to the relational entity in the first knowledge tuple, the source first knowledge tuple (h, r, t) is converted into basic form of knowledge information, that is, the first sample knowledge information k source , such as "Owls can fly", from this we can obtain the direct statement form of knowledge triples in the knowledge base as the basic knowledge information, so that the knowledge generation model trained based on this can learn the knowledge in the knowledge base more directly.

[0109] In some embodiments, the step of acquiring the second sample knowledge information includes:

[0110] Inputting the second candidate questions into the large language model to obtain multi-dimensional candidate knowledge information corresponding to each second candidate question and target response content corresponding to each dimension of candidate knowledge information;

[0111] According to the target response content and the answer label of the sample question corresponding to each dimension of candidate knowledge information, consistency calculation is performed to obtain the consistency score corresponding to each dimension of candidate knowledge information;

[0112] Predicting the sample change information of the target reply content before and after adding each dimension of candidate knowledge information on the basis of the second candidate question;

[0113] According to the sample change information, the benefit scores corresponding to the candidate knowledge information of each dimension are obtained;

[0114] According to the consistency score and the benefit score, second sample knowledge information is obtained from the multi-dimensional candidate knowledge information.

[0115] Optionally, since the basic knowledge information obtained from the database is relatively monotonous, in order to supplement the sample questions with more diverse knowledge information, this embodiment uses a large language model to learn the prompt information to obtain diversified knowledge information, and in order to ensure the quality of the generated knowledge information, the generated knowledge information is filtered for consistency (i.e., the answer prediction result obtained by the large language model is consistent with the answer label) and usefulness (i.e., the supplemented knowledge can make the general question-answering model more inclined to predict the correct answer), so as to convert the finally screened and retained knowledge information into the training input form of the generative language model. The specific steps are as follows:

[0116] By calling a large language model (such as GPT-3), the second candidate question q is prompted for learning and generation to obtain diverse candidate knowledge information, such as "Owl is a bird."

[0117] In addition, in order to filter out erroneous and invalid synthetic data, the target response content corresponding to each dimension of candidate knowledge information is required to be generated simultaneously during the process of calling the large language model, and the target response content corresponding to each dimension of candidate knowledge information and the answer label of the sample question are calculated for consistency to obtain the consistency score corresponding to each dimension of candidate knowledge information; in addition, the general question-answering model is used to predict the sample change information of the answer prediction probability before and after adding each dimension of candidate knowledge information on the basis of the second candidate question, and the helpfulness score corresponding to each dimension of candidate knowledge information is calculated based on the sample change information.

[0118] Subsequently, the consistency score and the helpfulness score are fused to screen and obtain high-quality second sample knowledge information from the multidimensional candidate knowledge information based on the fusion result; alternatively, consistency filtering is performed based on the consistency score and helpfulness filtering is performed based on the helpfulness score, respectively, to select knowledge information whose consistency score is greater than a first threshold and whose helpfulness score is greater than a second threshold from the multidimensional candidate knowledge information as the second sample knowledge information.

[0119] The calculation formula of the benefit score is as follows:

[0120]

[0121] S(k|q, a*, A) represents the helpfulness score, a* is the answer label, and a′ is the sample change information of the target reply content before and after the candidate knowledge information; log p(a*|q, k) represents the predicted probability of predicting that each answer label a* belongs to the second candidate question q and concatenating knowledge information k of different dimensions; p(a′|q, k) represents the predicted probability of predicting that each sample change information a′ belongs to the second candidate question q and concatenating knowledge information k of different dimensions; p(a*|q) represents the probability of predicting that each answer label a* belongs to the second candidate question q, and p(a′|q) represents the probability of predicting that each sample change information a′ belongs to the second candidate question q.

[0122] The embodiments of the present invention utilize the prompt learning ability of a large language model to supplement diverse knowledge information, and form high-quality common sense questions and answers and knowledge information after filtering. The knowledge generation model trained based on this can more efficiently learn multi-sample, high-quality generalized knowledge information.

[0123] In some embodiments, the step of training the knowledge generation model includes:

[0124] Pre-training the small language model based on the first candidate question and the first sample knowledge information to obtain a pre-trained knowledge model;

[0125] Based on the second candidate question and the second sample knowledge information, the pre-trained knowledge model is trained to obtain a knowledge generation model.

[0126] Optionally, a pre-trained language model of a smaller size with a model size smaller than a certain scale, i.e., a small language model, can be selected; in order to enable the trained knowledge generation model to simultaneously learn the rich knowledge in the knowledge base and the generalized knowledge generation capability of the large language model, the small language model is gradually trained in two stages by utilizing the first candidate question and the second candidate question of the sample question synthesized based on the knowledge base and the large language model, as well as the first sample knowledge information and the second sample knowledge information, so as to obtain a knowledge generation model that can efficiently output high-quality knowledge information based on various questions, so that the knowledge generation model can accurately learn the mapping x→y that produces a specific output for a specific input. The specific training steps of the knowledge generation model are as follows:

[0127] In the first stage, the first candidate question synthesized using the knowledge base and the first sample knowledge information k source , pre-train the small language model to train the small language model to be able to answer the first candidate question In the case of generating source knowledge, that is, the first sample knowledge information k source , thus obtaining a pre-trained knowledge model; the pre-trained knowledge model can fully memorize the relationship between the knowledge in the knowledge base and the problem, that is, y=k source .

[0128] Exemplarily, given the question "What can an owl do" as input, the training goal is to enable the pre-trained knowledge model obtained through training to effectively predict the knowledge information "an owl can fly".

[0129] In the second stage, the second candidate question q and the second sample knowledge information k synthesized using the knowledge base and the large language model are llm , train the pre-trained knowledge model to train the model to generate generalized high-quality knowledge, that is, the second sample knowledge information k, given the second candidate question q llm , thus we get a knowledge generation model; this knowledge generation model can imitate a large language model to generate high-quality knowledge information when given a complete question with options, that is, x = q, y = k llm .

[0130] For example, given the question "What can an owl do? (A) Fly (B) Talk" as input, the training goal is to enable the trained knowledge generation model to effectively predict the knowledge information "Owls are birds, and birds can fly."

[0131] The embodiment of the present invention performs multi-stage training on a small language model by synthesizing the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information based on the knowledge base and the large language model, thereby strengthening the ability of the knowledge generation model to learn the rich knowledge in the knowledge base and the generalized knowledge generation ability of the large language model. At the same time, a small knowledge generation model that is more convenient to deploy and has controllable parameters can be trained at a lower cost, thereby achieving low-cost and high-precision question and answer implementation.

[0132] In some embodiments, the method further comprises:

[0133] Input the target dialogue content into the question-answering model, and predict the target change information of the target reply content before and after adding each dimension of target knowledge information based on the interactive dialogue questions;

[0134] According to the target change information, the benefit scores corresponding to the target knowledge information of each dimension are obtained;

[0135] The beneficial scores corresponding to the target knowledge information of each dimension are used as reward values, and the knowledge generation model is used as the strategy network to perform reinforcement learning and update on the knowledge generation model.

[0136] Optionally, due to the timeliness of question-answering data, the distribution of question-answering data may drift, which in turn affects the performance of knowledge generation. Therefore, when additional specific common sense question-answering task training data is available, the knowledge generation model can be fed back for reinforcement learning based on the performance of the question-answering model on real data to achieve further real-time updates of the knowledge generation model, so as to improve its generalization ability in scenarios with high timeliness requirements. The specific update steps are as follows:

[0137] The knowledge generation model is used as a strategy model, combined with the running results of the question-answering model on real data, and the beneficial score is calculated as the reward function. The proximal strategy optimization algorithm is used to further update the knowledge generation model to further improve the knowledge generation performance of the knowledge generation model on specific common sense question-answering tasks.

[0138] Here, the step of calculating the helpfulness score may specifically be to input the target dialogue content into the question-answering model, and predict the target change information of the target reply content before and after adding each dimension of target knowledge information on the basis of the interactive dialogue question, so as to calculate the helpfulness score corresponding to each dimension of target knowledge information through the target change information. For details, please refer to the helpfulness score calculation steps under the sample question.

[0139] The embodiment of the present invention updates the knowledge generation model in real time through a real-time updated logical closed loop, so that the knowledge generation model has the ability to automatically update, providing comprehensive protection for the integrity, effectiveness and high quality of knowledge generation; and supports automatic updating of model capabilities so that question-answering technology can continue to evolve to adapt to market changes and new business needs, is easy to expand and upgrade, and has good adaptability, functional extensibility and operational flexibility.

[0140] Figure 3 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 3 As shown, the electronic device may include: a processor 310, a communications interface 320, a memory 330 and a communication bus 340, wherein the processor 310, the communications interface 320 and the memory 330 communicate with each other via the communication bus 340. The processor 310 may call the logic instructions in the memory 330 to execute the robot interaction method, which includes:

[0141] Obtain interactive dialogue questions from target users;

[0142] Inputting the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question;

[0143] Acquire target dialogue content according to the interactive dialogue question and the target knowledge information of each dimension;

[0144] Inputting the target dialogue content into the question-answering model to obtain the target response content corresponding to the interactive dialogue question;

[0145] Feedback the target reply content to the target user;

[0146] Among them, the knowledge generation model is obtained by training a small language model based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question; the question-answering model is obtained by training the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, and the answer label of the sample question; the first candidate question is generated based on the first knowledge tuple in the knowledge base; the second candidate question is generated based on the first candidate question and the second knowledge tuple in the knowledge base; the first sample knowledge information is converted based on the first knowledge tuple; the second sample knowledge information is obtained by learning the prompt information of the second candidate question through a large language model; the first knowledge tuple includes knowledge tuples associated with the sample question; the second knowledge tuple includes knowledge tuples that have the same relationship entity, different question entities and different answer entities as the first knowledge tuple.

[0147] In addition, the logic instructions in the above-mentioned memory 330 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0148] On the other hand, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the robot interaction method provided by the above methods, the method comprising:

[0149] Obtain interactive dialogue questions from target users;

[0150] Inputting the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question;

[0151] Acquire target dialogue content according to the interactive dialogue question and the target knowledge information of each dimension;

[0152] Inputting the target dialogue content into the question-answering model to obtain the target response content corresponding to the interactive dialogue question;

[0153] Feedback the target reply content to the target user;

[0154] Among them, the knowledge generation model is obtained by training a small language model based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question; the question-answering model is obtained by training the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, and the answer label of the sample question; the first candidate question is generated based on the first knowledge tuple in the knowledge base; the second candidate question is generated based on the first candidate question and the second knowledge tuple in the knowledge base; the first sample knowledge information is converted based on the first knowledge tuple; the second sample knowledge information is obtained by learning the prompt information of the second candidate question through a large language model; the first knowledge tuple includes knowledge tuples associated with the sample question; the second knowledge tuple includes knowledge tuples that have the same relationship entity, different question entities and different answer entities as the first knowledge tuple.

[0155] The virtual welcoming robot embodiment described above is merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. Those of ordinary skill in the art may understand and implement the present embodiment without creative labor.

[0156] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.

[0157] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A virtual welcoming robot, characterized in that: It includes an interactive device, an interactive processing device and a sliding device, wherein the interactive processing device is connected and communicated with the interactive device; the interactive device includes an interactive display module and / or a voice broadcast module; the interactive processing device includes an interactive middle station, a dialogue question acquisition module, a knowledge prediction module, a dialogue content acquisition module and a reply content prediction module; the interactive middle station is respectively connected to the dialogue question acquisition module, the knowledge prediction module, the dialogue content acquisition module and the reply content prediction module, and is used to store and manage the data of each module; the sliding device includes a universal wheel or a sliding crawler, which is used to control the movement of the virtual welcoming robot; A dialogue question acquisition module is used to obtain interactive dialogue questions of target users; A knowledge prediction module, used for inputting the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question; A dialogue content acquisition module, used to acquire target dialogue content according to the interactive dialogue question and the target knowledge information of each dimension; A reply content prediction module, used to input the target dialogue content into the question-answering model to obtain the target reply content corresponding to the interactive dialogue question; The interactive device is used to feed back the target reply content to the target user; Wherein, the knowledge generation model is obtained by training a small language model based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question; the question-answering model is obtained by training the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, and the answer label of the sample question; the first candidate question is generated based on the first knowledge tuple in the knowledge base; the second candidate question is generated based on the first candidate question and the second knowledge tuple in the knowledge base; the first sample knowledge information is obtained by converting the first knowledge tuple; the second sample knowledge information is obtained by learning the prompt information of the second candidate question through a large language model; the first knowledge tuple includes knowledge tuples associated with the sample question; the second knowledge tuple includes knowledge tuples having the same relationship entity, different question entities and different answer entities as the first knowledge tuple; The first candidate question is obtained based on the following steps: Extracting the first knowledge tuple from the knowledge base; Determining a target verbalization template according to the relationship type of the relationship entity in the first knowledge tuple; According to the target verbalization template, converting the question entity and the relation entity in the first knowledge tuple into the first candidate question; The second candidate question is obtained based on the following steps: Extracting at least one of the second knowledge tuples from the knowledge base; Synthesize the second candidate question according to the first candidate question, the answer entity in the first knowledge tuple, and the answer entity in each of the second knowledge tuples; The second sample knowledge information is obtained based on the following steps: Inputting the second candidate questions into the large language model to obtain multi-dimensional candidate knowledge information corresponding to each of the second candidate questions and target reply content corresponding to each dimension of the candidate knowledge information; Perform consistency calculation according to the target response content corresponding to the candidate knowledge information in each dimension and the answer label of the sample question to obtain the consistency score corresponding to the candidate knowledge information in each dimension; Predicting, based on the second candidate question, adding sample change information of the target reply content before and after the candidate knowledge information of each dimension; According to the sample change information, obtaining the benefit score corresponding to the candidate knowledge information in each dimension; Acquire the second sample knowledge information from the multi-dimensional candidate knowledge information according to the consistency score and the benefit score; The training steps of the knowledge generation model include: Based on the first candidate question and the first sample knowledge information, pre-training the small language model to obtain a pre-trained knowledge model; Based on the second candidate question and the second sample knowledge information, the pre-trained knowledge model is trained to obtain the knowledge generation model.

2. A robot interaction method, characterized in that: include: Obtain interactive dialogue questions from target users; Inputting the interactive dialogue question into the knowledge generation model to obtain at least one dimension of target knowledge information of the interactive dialogue question; Acquire target dialogue content according to the interactive dialogue question and the target knowledge information of each dimension; Inputting the target dialogue content into the question-answering model to obtain the target response content corresponding to the interactive dialogue question; Feedback the target reply content to the target user; Wherein, the knowledge generation model is obtained by training a small language model based on the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information of the sample question; the question-answering model is obtained by training the first candidate question, the second candidate question, the first sample knowledge information and the second sample knowledge information, and the answer label of the sample question; the first candidate question is generated based on the first knowledge tuple in the knowledge base; the second candidate question is generated based on the first candidate question and the second knowledge tuple in the knowledge base; the first sample knowledge information is obtained by converting the first knowledge tuple; the second sample knowledge information is obtained by learning the prompt information of the second candidate question through a large language model; the first knowledge tuple includes knowledge tuples associated with the sample question; the second knowledge tuple includes knowledge tuples having the same relationship entity, different question entities and different answer entities as the first knowledge tuple; The first candidate question is obtained based on the following steps: Extracting the first knowledge tuple from the knowledge base; Determining a target verbalization template according to the relationship type of the relationship entity in the first knowledge tuple; According to the target verbalization template, converting the question entity and the relation entity in the first knowledge tuple into the first candidate question; The second candidate question is obtained based on the following steps: Extracting at least one of the second knowledge tuples from the knowledge base; Synthesize the second candidate question according to the first candidate question, the answer entity in the first knowledge tuple, and the answer entity in each of the second knowledge tuples; The second sample knowledge information is obtained based on the following steps: Inputting the second candidate questions into the large language model to obtain multi-dimensional candidate knowledge information corresponding to each of the second candidate questions and target reply content corresponding to each dimension of the candidate knowledge information; Perform consistency calculation according to the target response content corresponding to the candidate knowledge information in each dimension and the answer label of the sample question to obtain the consistency score corresponding to the candidate knowledge information in each dimension; Predicting, based on the second candidate question, adding sample change information of the target reply content before and after the candidate knowledge information of each dimension; According to the sample change information, obtaining the benefit score corresponding to the candidate knowledge information in each dimension; Acquire the second sample knowledge information from the multi-dimensional candidate knowledge information according to the consistency score and the benefit score; The training steps of the knowledge generation model include: Based on the first candidate question and the first sample knowledge information, pre-training the small language model to obtain a pre-trained knowledge model; Based on the second candidate question and the second sample knowledge information, the pre-trained knowledge model is trained to obtain the knowledge generation model.

3. The robot interaction method according to claim 2, characterized in that: The method further comprises: Inputting the target dialogue content into the question-answering model, predicting and obtaining target change information of the target reply content before and after adding the target knowledge information of each dimension on the basis of the interactive dialogue question; According to the target change information, obtaining the benefit score corresponding to the target knowledge information in each dimension; The beneficialness score corresponding to the target knowledge information in each dimension is used as a reward value, and the knowledge generation model is used as a strategy network to perform reinforcement learning and update on the knowledge generation model.

4. The robot interaction method according to claim 2, characterized in that: The step of obtaining target dialogue content according to the interactive dialogue question and the target knowledge information of each dimension includes: Generate blank knowledge information corresponding to the interactive dialogue question; Generate a knowledge set according to the blank knowledge information and at least one dimension of the target knowledge information; The interactive dialogue questions are combined with each piece of knowledge information in the knowledge set to obtain the target dialogue content.

5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the robot interaction method according to any one of claims 2 to 4 is implemented.

6. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the robot interaction method according to any one of claims 2 to 4 is implemented.

Citation Information

Patent Citations

  • Improving dialog recommendation system through multi-preference modeling and knowledge enhancement

    CN116628176A

  • Knowledge question-answering method and device based on domain knowledge graph, and electronic equipment

    CN117076688A

  • Question and answer processing method, system and equipment and storage medium

    CN117473057A

  • Question and answer data construction method and device based on large language model

    CN117591661A

  • Knowledge-Driven and Self-Supervised System for Question-Answering

    US20220147861A1