Human-computer interaction method and electronic equipment
By improving user fuzzy problems in electronic devices, generating more specific questions, and searching for similar questions in the knowledge base, the problem of inaccurate answers caused by fuzzy questions by users is solved, and the answer accuracy of human-computer interaction is improved and User experience.
Patent Information
- Application Number
- CN201911016917.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-10-24
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2039-10-24
AI Technical Summary
During the human-computer interaction, due to the vague questions raised by users, electronic devices cannot accurately search the knowledge base, resulting in the inability to provide accurate answers.
By receiving the first question of the user, when there is no similar problem matching the problem in the knowledge base, the user is prompted for the candidate problem associated with the problem, and determine whether the candidate problem is a critical problem based on the user's answer, and a second problem is generated based on the user's answer, and a Questions to find matching similar questions in the knowledge base to provide answers.
By improving the original user's questions, electronic devices can search and provide answers in the knowledge base more accurately, improving the accuracy of response and user experience during human-computer interaction.
Smart Images

Figure CN112711653B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and in particular to a human-computer interaction method and electronic equipment. Background Art
[0002] As the functions of electronic devices continue to improve, their applications are becoming more and more extensive, and the interactions between users and electronic devices are increasing. Figure 1 As shown, a user can ask questions to an electronic device (such as a consultation terminal / robot used for medical consultation, etc.), and the electronic device searches the knowledge base for similar questions that match the questions asked by the user based on a pre-set knowledge base that includes multiple question-answer pairs consisting of questions and corresponding answers, and provides the user with the answer corresponding to the question, thereby completing the answer to the question asked by the user.
[0003] However, due to the limitation of users' professional ability, there are problems that users ask vague, incomplete, or do not contain keywords, which makes it impossible for electronic devices to search for accurate answers based on the questions asked by users. For example, the question asked by the user is "I have a cold", but the actual complete question should be "The weather is changing a lot, I have a runny nose, and my throat does not hurt", which makes it impossible for the electronic device to search for similar questions matching the user's question in the knowledge base because the question "I have a cold" asked by the user is vague, and it is impossible to accurately answer the question asked by the user. Therefore, how to improve the question asked by the user when the question asked by the user is vague so that the electronic device can output an accurate answer has become a problem that needs to be solved urgently. Summary of the invention
[0004] The embodiments of the present application provide a human-computer interaction method and an electronic device, which are used to solve the problem that during human-computer interaction, the electronic device cannot accurately answer the questions raised by the user due to vague questions raised by the user.
[0005] In the first aspect, the embodiment of the present application provides a human-computer interaction method, which can be executed by an electronic device or by a processing chip in the electronic device. The method includes: receiving a first question from a user; when there is no similar question matching the first question in the knowledge base, prompting the user with a candidate question associated with the first question in the knowledge base, wherein the knowledge base includes a question-and-answer library, and the question-and-answer library includes a plurality of question-and-answer pairs consisting of questions and corresponding answers; receiving the user's answer to the candidate question; when the candidate question is determined to be a key question based on the answer, generating a second question, the second question is related to the first question and the candidate question; searching for similar questions matching the second question in the question-and-answer library, and prompting the user with the answer to the similar question matching the second question.
[0006] In an embodiment of the present application, during the human-computer interaction process, when the electronic device determines that there are no similar questions matching the first question raised by the user in the knowledge base, it prompts the user with candidate questions associated with the first question, and determines whether the raised candidate question is a key question recognized by the user based on the user's answer to the candidate question. When the raised candidate question is a key question recognized by the user, a second question is generated based on the first question and the candidate question, thereby improving the question raised by the user, so that the electronic device can output a more accurate answer based on the improved second question, thereby improving the accuracy of the electronic device's response during the human-computer interaction process and improving the user experience.
[0007] In a possible design, when there is no question in the question-answer database whose similarity to the first question is greater than a threshold, it can be determined that there is no similar question matching the first question in the knowledge base. The above design helps to avoid the electronic device providing inaccurate answers to users during human-computer interaction.
[0008] In a possible design, the knowledge base also includes a classification question library, which includes one or more candidate questions under each question type, and the one or more candidate questions have corresponding weights; prompting the user with candidate questions associated with the first question in the knowledge base may include: determining the question type corresponding to the first question; and prompting the user with candidate questions associated with the first question in the knowledge base in descending order of the weights of the one or more candidate questions under the determined question type. The above design helps to accurately select candidate questions associated with the first question and improves the efficiency of perfecting questions raised by users.
[0009] In one possible design, determining that the candidate question is a key question based on the answer may include: determining a key semantic value of the candidate question, wherein the key semantic value is related to the sentiment value of the candidate question and the degree of sentiment identification of the answer, wherein the sentiment value of each candidate question and the degree of sentiment identification of different answers corresponding to each candidate question may be pre-set in the classification question library; when the key semantic value is greater than a key semantic threshold value, the candidate question may be determined to be a key question. In the above design, the key semantics of the candidate question are determined based on the sentiment value of the candidate question and the degree of sentiment identification of the user's answer to the candidate question, and then determining whether the candidate question is a key question, which helps to accurately determine the key issues associated with the questions raised by the user and improve the questions raised by the user.
[0010] In a possible design, the combination of the first question and the candidate question to generate the second question can be achieved by combining the first question and the candidate question to generate the second question; or, it can be achieved by extracting at least one first keyword of the first question and at least one second keyword of the second question, and generating the second question based on the at least one first keyword and the at least one second keyword. In the above design, the method of generating the second question based on the first question and the candidate question is enriched, which makes it easy to select the method of generating the second question according to the needs.
[0011] In a possible design, the method may further include: when there is a similar question matching the first question in the knowledge base, prompting the user with an answer corresponding to the similar question based on the question-answer pair corresponding to the similar question in the question-answer base. The above design helps the electronic device to accurately answer the original question raised by the user during the human-computer interaction process.
[0012] In a second aspect, an embodiment of the present application further provides an electronic device, comprising a memory and a processor, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs include instructions, which, when executed by the processor, enable the electronic device to perform the method described in the above-mentioned first aspect or any possible design of the first aspect.
[0013] In a third aspect, an embodiment of the present application further provides an electronic device, which includes functional modules capable of executing the electronic device behavior in the above-mentioned first aspect or any possible design of the first aspect; these functional modules can be implemented by hardware, or corresponding software can be implemented by hardware.
[0014] In a fourth aspect, an embodiment of the present application further provides a chip, which is coupled to a memory and is used to read and execute computer program instructions stored in the memory to execute the method described in the above-mentioned first aspect or any possible design of the first aspect.
[0015] In a fifth aspect, an embodiment of the present application further provides a computer storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any possible design of the first aspect.
[0016] In a sixth aspect, an embodiment of the present application further provides a program product, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect or any possible design of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a schematic diagram of the existing human-computer interaction process;
[0018] Figure 2 A schematic diagram of an application scenario provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of the hardware structure of a mobile phone provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of a graphical user interface of a mobile phone provided in an embodiment of the present application;
[0021] Figure 5 One of the human-computer interaction schematic diagrams provided in the embodiment of the present application;
[0022] Figure 6 A second schematic diagram of human-computer interaction provided in an embodiment of the present application;
[0023] Figure 7 A schematic diagram of a human-computer interaction process provided in an embodiment of the present application;
[0024] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0026] Figure 2 is a schematic diagram of an application scenario to which the embodiment of the present application can be applied, such as Figure 2As shown, the user can ask a question to the electronic device, and the electronic device searches the knowledge base for the question with the highest similarity to the question raised by the user. If the similarity of the question with the highest similarity searched to the question raised by the user is less than the set threshold, the electronic device determines that there is no similar question matching the question raised by the user in the knowledge base, and the question raised by the user is vague and cannot directly get an accurate answer. According to the question raised by the user, the user is asked to ask the user an associated question associated with the question raised by the user, and according to the user's answer to the associated question, it is determined whether the proposed associated question is a key question recognized by the user. And when the proposed associated question is a key question recognized by the user, the associated question is combined with the question raised by the user to generate a combined question, so as to search the knowledge base according to the combined question and obtain an accurate answer. In addition, it should be understood that in the embodiment of the present application, the knowledge base can be set in the electronic device, or in a server or other device that has a wired, wireless or other communication connection with the electronic device. The operation of searching the knowledge base can also be completed by a server or other device that has a communication connection with the electronic device, such as the electronic device sends the question raised by the user to the server, and the server searches the knowledge base for the question with the highest similarity to the question raised by the user according to the question raised by the user, and provides the answer to the question to the electronic device, and the electronic device then answers it to the user.
[0027] It can be seen that in the embodiments of the present application, during the human-computer interaction process, even if the questions raised by the user are vague, the electronic device can use the questions raised by the user as clues, and through the question-and-answer interaction process with the user, improve the questions raised by the user, thereby obtaining accurate answers, thereby improving the accuracy of responses during the human-computer interaction process and improving the user experience.
[0028] Below, some terms in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0029] 1) Knowledge base. In the embodiment of the present application, the knowledge base is composed of a question-and-answer library and a classification question library, wherein the question-and-answer library includes a plurality of question-and-answer pairs consisting of questions and corresponding answers. For example, the question "red rash" and the answer "urticaria diagnosis" constitute a question-and-answer pair. In the classification question library, one or more candidate questions under different question types and the weight corresponding to each candidate question are included. Optionally, the classification question library may also include the answer corresponding to each candidate question, wherein the question-and-answer library may include a question-and-answer pair consisting of each candidate question in the classification question library and the answer corresponding to each candidate question. Referring to Table 1, an example of a classification question library is shown. In the embodiment of the present application, if the question raised by the user is vague and the electronic device cannot determine similar questions matching the question raised by the user in the knowledge base (question-and-answer library) based on the question raised by the user, then the question type corresponding to the question raised by the user can be determined first, and then the weight of one or more candidate questions under the question type determined in the classification question library is used. In descending order, questions are asked to the user, thereby improving the question raised by the user.
[0030] Question Type Candidate Questions Answer Weight skin Have a rash Urticaria diagnosis 90 skin I've been eating seafood recently. Seafood allergy 60 Internal Medicine I have slept well recently. Endocrine disorders 70 Less Tin Is the steel mesh blocked? Steel mesh plugging 90 Less Tin Poor solder paste fluidity Solder paste drying 60 Defective pins Poor device solderability Device failure 70 Defective pins Defective materials from manufacturers Poor quality of incoming materials 80
[0031] Table 1
[0032] As shown in Table 1, in the classification question library, candidate questions can be manually edited and have a variety of free semantic expressions, such as negative semantics, opposite semantics, etc. For example: asking whether you smoke may have the following forms in the classification question library: normal semantics: have you smoked recently; negative semantics: have you not smoked recently; opposite semantics: have you quit smoking (the antonym of smoking is quitting smoking). In addition, the weight of candidate questions under each question type can also be manually edited, or set according to the frequency of use of candidate questions, the term frequency corresponding to the candidate questions, the term frequency-inverse document frequency (TF-IDF) corresponding to the candidate questions, and the pointwise mutual information (PMI) corresponding to the candidate questions.
[0033] 2) Sentiment analysis model (M1), used to perform sentiment analysis on the question text, calculate the sentiment value (Vs) of the question text, and the range of the sentiment value is [-d, d], such as [-1, 1]. Among them, the larger the value of the sentiment value, the more positive the sentiment is, that is, the more positive the question text is; the smaller the value of the sentiment value, the more negative the sentiment is, that is, the more negative the question text is. The implementation method of the sentiment analysis model can adopt data modeling method, dictionary matching method, etc. Using mathematical modeling method, machine learning algorithms (such as forward neural network, convolutional neural network, recurrent neural network, etc.) can be used to learn and model the annotated corpus (question text and its corresponding sentiment value). The completed sentiment analysis model can output the sentiment value corresponding to the question text according to the input question text. The dictionary matching method can also be used. A dictionary is pre-set to record the sentiment values corresponding to negative sentiment words, degree adverbs, negative words, etc., and the sentiment value corresponding to the negative sentiment words, degree adverbs, and negative words appearing in the question text can be determined by identifying the sentiment values corresponding to the negative sentiment words, degree adverbs, and negative words in the question text through the dictionary. Referring to Table 2(A) and Table 2(B), an example of a possible sentiment analysis model is shown.
[0034]
[0035]
[0036] Table 2(A)
[0037]
[0038] Table 2(B)
[0039] 3) Emotional recognition degree model (M2), used to perform sentiment analysis on the answer text and calculate the emotional recognition degree (approval value, Va) of the answer text. The range of emotional recognition degree is [-c, c], such as [-1, 1], where the larger the value of the emotional recognition degree is, the more recognition it represents, and the smaller the value of the emotional recognition degree is, the less recognition it represents. The implementation method of the emotional recognition degree model can adopt mathematical modeling method, dictionary matching method, etc. In the case of mathematical modeling method, a machine learning algorithm (such as a forward neural network, a convolutional neural network, a recurrent neural network, etc.) can be used to learn and model the annotated corpus (answer text and its corresponding emotional recognition degree). The completed emotional recognition degree model can be used to input the emotional recognition degree corresponding to the answer text according to the input answer text. The dictionary matching method can also be used to pre-set a dictionary to record the emotional recognition degree corresponding to the affirmative words, negative words, and degree adverbs. The emotional recognition degree of the answer text can be determined by identifying the emotional recognition degree corresponding to the affirmative words, negative words, and degree adverbs in the answer text through the dictionary. Referring to Table 3, an example of a possible emotional recognition degree model is shown.
[0040]
[0041] Table 3
[0042] 4) Key semantic value (keyword value, Vk), key semantic value Vk = -(Vs*Va), is used to calculate the degree of key semantics (keywords) contained in the question text, as shown in Table 4. The principle is as follows: when asking questions to users, the more negative the question is, the more the user approves it, which means that the question has the user's difficulties and contains more precise question semantics (keywords), and the question asked is a key question; similarly, the more positive the question is, the less the user approves it, and the question asked is a key question.
[0043]
[0044] Table 4
[0045] In addition, it should be understood that the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "one", "a kind", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the embodiments of the present application, "one or more" refers to one, two or more; "and / or" describes the association relationship of the associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. In addition, the multiple involved in the embodiments of the present application refers to greater than or equal to two. It should be noted that in the description of the embodiments of the present application, the words "first", "second" and the like are only used for the purpose of distinguishing the description, and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0046] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0047] The following describes electronic devices and embodiments for using such electronic devices. In some embodiments of the present application, the electronic device may be a hardware device that has the function of receiving voice and / or text, and playing voice and / or displaying text, and may be a mobile phone, tablet computer, smart speaker, digital camera, wearable device (such as a smart watch), in-vehicle voice interaction device, etc., or a television, laptop computer, conversational robot, etc., as long as it has the function of receiving voice and / or text, and playing voice and / or displaying text.
[0048] Typically, an electronic device can support multiple applications, such as one or more of the following applications: question-and-answer robots, WeChat, DingTalk, etc. The question-and-answer robots may also be called chatbots, consultation assistants, intelligent customer service, virtual assistants, etc., depending on their positioning or application fields. For example, intelligent customer service is used to solve application (APP), hardware operation process problems and after-sales services within a limited professional field and scope, replacing traditional instructions and after-sales services; chatbots have no restrictions on the purpose and scope of use, and are used for entertainment and leisure purposes, as well as life information inquiries, etc. The applications involved in this article may be applications that come with the electronic device when it leaves the factory, or applications that the electronic device downloads and installs from the network side, or applications that the electronic device receives from other electronic devices, and the embodiments of this application are not limited thereto.
[0049] Take the mobile phone as an example, Figure 3 FIG. 1 shows a schematic diagram of the structure of the mobile phone 100. Figure 3 As shown, the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 151, a wireless communication module 152, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.
[0050] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors. The controller may be the nerve center and command center of the mobile phone 100. The controller may generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions. A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The memory may store instructions or data that have just been used or cyclically used by the processor 110. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved. In an embodiment of the present application, the processor 110 can run the software code / module of the human-computer interaction algorithm and execute the corresponding human-computer interaction process. The specific process will be introduced later.
[0051] The display screen 194 is used to display the display interface of the application in the mobile phone 100, such as the camera's viewfinder interface, the WeChat chat interface, the answer interface of the question-answering robot interface, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0052] The camera 193 is used to capture static images, dynamic images or videos. In an embodiment of the present application, the number of cameras 193 in the mobile phone 100 may be at least two. Taking two as an example, one is a front camera and the other is a rear camera; taking three as an example, one is a front camera and the other two are rear cameras. It should be noted that the camera 193 may be a wide-angle camera, a telephoto camera, and the like. Typically, the camera 193 may include a photosensitive element such as a lens group and an image sensor, wherein the lens group includes a plurality of lenses (convex lenses or concave lenses) for collecting light signals reflected by the object to be photographed (such as a user's face, scenery, etc.), and transmitting the collected light signals to the image sensor. The image sensor generates an image of the object to be photographed based on the light signal.
[0053] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, at least one application required for a function (such as a camera, gallery, WeChat, etc.), etc. The data storage area can store data (such as images, videos, etc.) created during the use of the mobile phone 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. In some embodiments, the software code / module of the human-computer interaction algorithm may be stored in the internal memory 121, and the processor 110 runs the software code / module of the human-computer interaction algorithm to execute the corresponding human-computer interaction process. The specific process will be introduced later.
[0054] The sensor module 180 may include a fingerprint sensor 180H, a touch sensor 180K, and the like.
[0055] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.
[0056] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the mobile phone 100, which is different from the position of the display screen 194.
[0057] The SIM card interface 195 in the mobile phone 100 is used to connect a SIM card. The SIM card can be connected to or disconnected from the mobile phone 100 by inserting the SIM card interface 195 or pulling the SIM card interface 195 out.
[0058] The mobile phone 100 can implement audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor, etc. For example, music playing, recording, etc. In some embodiments, the microphone 170C may include one or more microphones (e.g., a microphone array).
[0059] It is to be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the mobile phone. In other embodiments of the present application, the mobile phone may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0060] For ease of understanding, the following embodiments of the present application will be described in detail with Figure 3 Taking the mobile phone with the structure shown as an example, the human-computer interaction method provided in the embodiment of the present application is specifically described in conjunction with the accompanying drawings.
[0061] In some embodiments, the human-computer interaction method provided in the embodiments of the present application can be applied in the field of medical consultation (such as seeking answers to questions related to skin rashes), the field of intelligent customer service (such as seeking answers to questions related to quality defects in the electronics manufacturing industry), etc. The following embodiments will be introduced using different scenarios as examples.
[0062] Scenario 1: Use the Q&A robot to ask questions related to skin rashes.
[0063] Figure 4(A) shows a graphical user interface (GUI) of the mobile phone 100, which can be called the desktop 400 (or main interface 400) of the mobile phone 100. When the mobile phone 100 detects an operation (e.g., a click operation) on the icon 401 of the question-answering robot application on the desktop 400, the question-answering robot application can be started and the following display can be displayed: Figure 4 (B) shows another GUI, which may be called a question-and-answer interface (or dialogue interface) 500. In some possible embodiments, the question-and-answer interface 500 may include one or more controls, and the user may input questions to the mobile phone 100 through the one or more controls. For example, the question is input by voice through the voice control 501, the question is input by text through the text control 502, or the question is input by image through the extension control 503. If the user inputs the question by voice, the mobile phone 100 converts the voice input by the user into text; if the user inputs the question by image, the mobile phone 100 recognizes the text in the image input by the user. For example, the user inputs the question (human question, Qh) "My skin is itchy and uncomfortable" by voice. Figure 5 As shown in (A), the mobile phone 100 converts the question input by the user in voice into text (question text), thereby obtaining the question text Qh=My skin is itchy and uncomfortable raised by the user, and can display it in the question-answering interface 500.
[0064] After the mobile phone 100 obtains Qh=My skin itches, it searches for the question with the highest similarity (such as text similarity) with Qh=My skin itches in the knowledge base. The similarity between the question with the highest similarity found in the knowledge base and Qh=My skin itches is less than the set threshold. The mobile phone 100 determines that Qh=My skin itches is vague and cannot directly determine the accurate answer, so it needs to be improved. The mobile phone 100 determines the question type of Qh=My skin itches, such as by using a machine learning algorithm (such as a forward neural network, a convolutional neural network, etc.) to learn and model the annotated corpus (question text and its corresponding question type). The modeled question classification model can output the question type corresponding to the question text based on the input question text. The mobile phone 100 obtains Qh=My skin itches, and the corresponding question type is skin. In the classification question library, the question with the highest weight of skin is found, the user is asked the question, and the user's answer (human reply, Rh) is received. Referring to Table 1, in the question classification library, the question with the highest weight in the skin category is "I have a rash". The mobile phone 100 selects the machine question (machine question, Qm) = "I have a rash", and sends the selected machine question to the user through text or voice, and receives the user's answer (Rh) = "I have a rash". For example, Figure 5 (B) shown.
[0065] After receiving the user's answer, the mobile phone 100 calculates Qm=the sentiment value of having a rash (Vs) through the sentiment analysis model, and calculates Rh=the sentiment identification degree of having a longer rash (Va) through the sentiment identification degree model. Referring to the example of the sentiment analysis model shown in Table 2A above and the example of the sentiment identification degree model shown in Table 3 above, the mobile phone 100 obtains Qm=the sentiment value of having a rash (Vs)=-0.9, and obtains Rh=the sentiment identification degree of having a longer rash (Va)=0.4.
[0066] The mobile phone 100 calculates the key semantic value Vk of Qm=having a rash=longer based on the emotional value (Vs) of Qm=having a rash and the emotional identification degree (Va) of Rh=having a rash. The key semantic value of the key semantics (keywords) of Qm=having a rash is 0.36. 0.36 is greater than the set key semantic threshold value t=0.15. The mobile phone 100 determines that the proposed Qm=having a rash is a key question, and combines Qh=Is my skin itchy and Qm=Is there a rash to generate a new question. For example, Qh=Is my skin itchy and Qm=Is there a rash directly concatenated to obtain the combined question Qd=Qh+Qm=Is my skin itchy and has a rash. Furthermore, we can also use natural language keyword extraction, named-entity recognition (NER) and other keyword extraction methods to extract keywords from Qh=my skin itchy and uncomfortable and Qm=I have a rash. After extracting keywords from Qh=my skin itchy and uncomfortable, we get the keywords "itchy skin, uncomfortable", and after extracting keywords from Qm=I have a rash, we get the keywords "rash", then we determine Qd=skin itchy and uncomfortable with a rash.
[0067] Mobile phone 100, based on the newly generated combined question Qd = itchy skin, rash, searches the knowledge base for similar questions with the highest similarity to Qd = itchy skin, rash, and the similarity is greater than a set threshold, and outputs the corresponding answer based on the answer "urticaria diagnosis" in the question-answer pair corresponding to the similar question in the knowledge base. For example, refer to Figure 5 As shown in (C), the mobile phone 100 generates an answer (An) = urticaria diagnosis.
[0068] Scenario 2: Using a question-and-answer robot to answer questions related to quality defects in the electronics manufacturing industry.
[0069] Similar to the above scenario 1, the user can start the question-answering robot application by operating (e.g., clicking) the icon 401 of the question-answering robot application on the desktop 400 of the mobile phone 100, and control the mobile phone 100 to enter the question-answering interface 500. The user enters the question Qh=What to do if the printed patch has insufficient tin in the form of text through the text control 502 in the question-answering interface. Figure 6 As shown in (A), after the mobile phone 100 receives the question (question text) input by the user in text form, it is displayed in the question and answer interface 500.
[0070] After the mobile phone 100 obtains Qh=What to do if there is insufficient tin on the printed patch, it searches for the question with the highest similarity (such as text similarity) to Qh=What to do if there is insufficient tin on the printed patch in the knowledge base. The similarity between the question with the highest similarity searched in the knowledge base and Qh=What to do if there is insufficient tin on the printed patch is less than the set threshold. The mobile phone 100 determines that Qh=What to do if there is insufficient tin on the printed patch is vague and cannot directly determine the accurate answer, so it needs to be improved. The mobile phone 100 determines that the question type corresponding to Qh=What to do if there is insufficient tin on the printed patch is insufficient tin. Referring to Table 1 above, in the question classification library, the question with the highest weight in the insufficient tin category is "Does the steel mesh block the holes?" The mobile phone 100 selects the machine question (Qm)=Does the steel mesh block the holes, and sends the selected machine question to the user through text or voice, and receives the user's answer (Rh)=No. For example, Figure 6 As shown in (B).
[0071] After receiving the user's answer, the mobile phone 100 calculates the sentiment value (Vs) of Qm=whether the steel mesh plugs the holes through the sentiment analysis model, and calculates the sentiment identification degree (Va) of Rh=no through the sentiment identification degree model. Referring to the example of the sentiment analysis model shown in Table 2B above and the example of the sentiment identification degree model shown in Table 3 above, the mobile phone 100 obtains the sentiment value (Vs) of Qm=whether the steel mesh plugs the holes=-0.9, and obtains the sentiment identification degree (Va) of Rh=no=-1. The mobile phone 100 calculates the key semantic value Vk=-(Vs*Va)=-(-0.9*-1) of Qm=whether the steel mesh plugs the holes based on the sentiment value (Vs) of Qm=whether the steel mesh plugs the holes and the sentiment identification degree (Va) of Rh=no. It is determined that the key semantic value of Qm=whether the steel mesh plugs the holes contains the key semantics (keywords) of -0.9, which is less than the set key semantic threshold value t=0.15.
[0072] The mobile phone 100 continues to select the second highest weighted question "Poor solder paste fluidity" in the question classification library in the order of weight values from high to low. The mobile phone 100 selects the machine problem (Qm) = poor solder paste fluidity, continues to ask questions to the user through text or voice, and receives the user's answer (Rh) = yes. For example, Figure 6As shown in (B), the mobile phone 100 proposes Qm=poor solder paste fluidity to the user in text form, receives Rh=yes in text form from the user, and displays it in the response interface 500. Referring to the example of the sentiment analysis model shown in Table 2B above and the example of the sentiment identification model shown in Table 3 above, the mobile phone 100 obtains the key semantic value Vk=-(-0.6*1)=0.6 of Qm=poor solder paste fluidity, which is greater than the set key semantic threshold value t=0.15. It is determined that Qm=poor solder paste fluidity contains key semantics (keywords) and is a key question. Qh=What to do if there is insufficient tin on the printed patch and Qm=poor solder paste fluidity are combined to generate a new question. For example, Qh=What to do if there is insufficient tin on the printed patch and Qm=poor solder paste fluidity are directly spliced to obtain the combined question Qd=Qh+Qm=What to do if there is insufficient tin on the printed patch and poor solder paste fluidity. According to the newly generated combined question Qd = What should I do if the printed patch has insufficient tin and the solder paste has poor fluidity, the knowledge base is searched for similar questions with the highest similarity to Qd = What should I do if the printed patch has insufficient tin and the solder paste has poor fluidity, and the similarity is greater than the set threshold. According to the answer "dry solder paste" in the question and answer pair corresponding to the similar question in the knowledge base, the corresponding answer is output. For example, refer to Figure 6 As shown in (C), the mobile phone 100 generates the answer An=solder paste dry.
[0073] It should be understood that in the embodiments of the present application, the question-answering robot is an application that conducts question-answering (dialogue) via text or voice, etc., and may also be referred to as a chat robot, a medical consultation assistant, an intelligent customer service, a virtual assistant, etc., depending on the positioning or application field, and when the question-answering robot is only applied in a certain field, the knowledge base may only store the question-answer pairs and classified questions corresponding to the field. For example, if the question-answering robot only involves the field of medical consultation, the question-answering robot may also be referred to as a medical consultation assistant, and only the question-answer pairs and classified questions related to the field of medical consultation may be stored in the knowledge base.
[0074] The following embodiments introduce possible implementations of human-computer interaction via the mobile phone 100. Figure 7 The flowchart of the human-computer interaction method provided by an embodiment of the present application is shown in FIG. Figure 3 The following embodiments take the method applied to the mobile phone 100 as an example. Figure 7 As shown, the process of the method includes:
[0075] S701: The mobile phone 100 receives the first question from the user.
[0076] In some embodiments, Figure 4(B) as an example, the user can ask the first question in the form of voice, text, image, etc. If the user inputs the first question in the form of voice, the mobile phone 100 converts the voice input by the user into text (question text); if the user inputs the first question in the form of image, the mobile phone 100 recognizes the text (question text) in the image input by the user.
[0077] S702: The mobile phone 100 determines whether there is a similar question matching the first question in the knowledge base, if not, executes S703, if yes, executes S708.
[0078] Among them, the knowledge base includes a question and answer library and a classification question library. The question and answer library includes multiple question and answer pairs consisting of questions and corresponding answers. The classification question library includes one or more candidate questions under each question type, and the weight corresponding to each candidate question.
[0079] In one possible implementation, after the mobile phone 100 receives the user's first question, it searches the knowledge base (question and answer library) to see whether there is a question whose similarity (such as text similarity) to the first question is greater than a set threshold. If so, the question with the highest similarity to the first question can be used as a similar question that matches the first question; if not, it is determined that there is no similar question matching the first question in the knowledge base.
[0080] S703: The mobile phone 100 prompts candidate questions associated with the first question.
[0081] S704: The mobile phone 100 receives the user's answer to the candidate question.
[0082] In the process of specifically implementing steps S703 and S704, in a possible implementation, when there is no similar question matching the first question in the knowledge base, the mobile phone 100 classifies the first question, determines the question type corresponding to the first question, and selects a candidate question in descending order of weight based on the weight of each candidate question under the question type in the knowledge base (classified question library), prompts the user with the candidate question through text or voice, and receives the user's answer to the candidate question.
[0083] Optionally, the mobile phone 100 may receive the user's answer to the candidate question in a variety of forms, such as receiving the user's answer to the candidate question in text, voice, etc., wherein if the user inputs the answer to the candidate question in voice, the mobile phone 100 converts the voice input by the user into text. The mobile phone 100 may also provide answer options for the user to choose after prompting the candidate question, allowing the user to choose, and determine the user's answer to the candidate question based on the answer option selected by the user. For example, after the mobile phone issues the candidate question, it displays candidate answer options such as yes, no, maybe, some, should be, not like this for the user to choose, and determines the user's answer to the candidate question based on the answer option selected by the user.
[0084] S705: The mobile phone 100 determines whether the candidate question is a key question according to the user's answer, and if so, executes S706; if not, executes S703.
[0085] The mobile phone 100 determines the sentiment value (Vs) corresponding to the candidate question according to the sentiment analysis model, determines the sentiment identification degree (Va) corresponding to the user's answer to the candidate question according to the sentiment identification degree model, and determines the key semantic value (Vk) of the candidate question according to the sentiment value (Vs) corresponding to the candidate question and the sentiment identification degree (Va) corresponding to the user's answer to the candidate question. For example, the key semantic value can meet the formula: Vk = -(Vs*Va) or Vk = -(Vs*Va) + b, etc. Of course, the key semantic value can also meet other formula requirements. b can be a preset adjustment value, specifically 0, -0.1, 0.1, etc. If the key semantic value corresponding to the candidate question is greater than the set key semantic threshold value (Tk), it is determined that the prompted candidate question contains key semantics (keywords) and is a key question. Otherwise, it is determined that the candidate question does not contain key semantics (keywords), and returns to S703 to reselect the candidate question for prompting.
[0086] It should be understood that when the mobile phone 100 selects candidate questions for the same question multiple times under the question type corresponding to the question in the knowledge base (classified question library) for prompting, the mobile phone 100 selects a candidate question from the unselected candidate questions (i.e., the candidate questions that have not been prompted) in descending order of weight according to the weight of each candidate question under the question type in the knowledge base (classified question library) for prompting. That is to say, after the execution of step S705 is completed and the process returns to continue to execute S703, a candidate question should be selected from the unselected candidate questions (i.e., the candidate questions that have not been prompted) in descending order of weight according to the weight of each candidate question under the question type for prompting.
[0087] When setting the key semantic threshold (Tk), the higher the Tk is set, the higher the quality of the key questions selected. However, the higher the Tk is set, the more likely it is that different candidate questions will need to be prompted multiple times before the key questions can be determined. The time to determine the key questions may be longer, and the process of obtaining appropriate answers may be slower. Tk can be adjusted according to actual needs. Optionally, when setting TK, if you need to select a higher quality key question, you can use the median of the maximum value of Vk and the minimum value of Vk, and the median of the maximum value of Vk as TK, for example: the maximum value of Vk is 1, the minimum value of Vk is -1, the median of the maximum value of Vk and the minimum value of Vk is 0, and the median of 0 and 1, 0.5, is used as TK; if you need to reduce the time to determine the key question and improve the efficiency of question answering, you can also use the median of the maximum value of Vk and the minimum value of Vk as TK, for example: Tk = [maximum value of Vk - minimum value of Vk] / 2 + minimum value of Vk. Taking the maximum value of Vk as 1 and the minimum value of Vk as -1 as an example, Tk = [1-(-1)] + -1 = 0. Of course, TK can also be flexibly set or adjusted according to the required question and answer quality and efficiency.
[0088] S706: The mobile phone 100 generates a second question according to the first question and the candidate question determined as the key question.
[0089] Optionally, when the candidate question prompted by mobile phone 100 is a key question, mobile phone 100 can directly combine the text of the first question and the candidate question determined as the key question to generate a second question. For example, if the first question is "Is my skin itchy and uncomfortable?" and the candidate question determined as the key question is "I have a rash", the second question generated by the combination is "My skin is itchy and uncomfortable and I have a rash." Natural language keyword extraction, named entity recognition and other keyword extraction methods can also be used to extract at least one keyword in the first question and at least one keyword in the candidate question, and the second question is generated based on the extracted at least one keyword in the first question and at least one keyword in the candidate question. For example, if the first question is "Is my skin itchy and uncomfortable?", after extracting keywords, the keywords "itchy skin, uncomfortable" are obtained, and if the candidate question is "I have a rash?", after extracting keywords, the keywords "rash" are obtained, and the second question generated is "Itchy skin and uncomfortable and I have a rash."
[0090] Before generating the second question, the mobile phone 100 may also perform multiple rounds of S703-S705 (question and answer) to select multiple candidate questions as key questions, combine the first question with the multiple candidate questions as key questions, and generate the second question to ensure the integrity of the generated second question.
[0091] S707: The mobile phone 100 updates the second question to the first question and executes S702.
[0092] Mobile phone 100 uses the generated second question as the new first question, and searches the knowledge base (question and answer library) for questions whose similarity to the new first question (such as text similarity) is greater than a set threshold. Optionally, mobile phone 100 can randomly select a question from the searched questions whose similarity to the new first question is greater than the set threshold as a similar question that matches the new first question; of course, in order to improve the accuracy of the answer, mobile phone 100 can also select the question with the highest similarity to the new first question from the searched questions whose similarity to the new first question is greater than the set threshold as a similar question that matches the new first question. When there is no question in the knowledge base (question and answer library) whose similarity to the new first question (such as text similarity) is greater than the set threshold, mobile phone 100 continues to propose candidate questions associated with the new first question and continues to improve the new first question.
[0093] Optionally, a prompt threshold may be pre-set. If the mobile phone 100 searches for candidate questions associated with the first question for a number of times greater than the set prompt threshold and still has not determined the key question associated with the first question, or has not determined a similar question that matches the improved first question (the generated second question), the mobile phone 100 may prompt a prompt message such as "Answer failed" to end the question and answer session.
[0094] S708: The mobile phone 100 outputs the answers corresponding to the similar questions.
[0095] Specifically, after determining a similar question that matches the user's first question, or determining a similar question that matches the second question (the updated first question) generated by combining the first question raised by the user with the key candidate questions associated with the first question, mobile phone 100 outputs the answer in the question-answer pair corresponding to the similar question in the knowledge base to complete the response to the question raised by the user.
[0096] In the above embodiments provided by the present application, the method provided by the embodiment of the present application is introduced from the perspective of the electronic device (mobile phone 100) as the execution subject. In order to implement the various functions in the method provided by the above embodiments of the present application, the electronic device may include a hardware structure and / or a software module, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a certain function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0097] The following describes the device provided in the embodiments of the present application in conjunction with the accompanying drawings to implement the above method embodiments of the present application.
[0098] like Figure 8As shown, some other embodiments of the present application disclose an electronic device, which may include: one or more processors 802, a memory 803, and one or more computer programs 804; the above-mentioned devices may be connected via one or more communication buses 805, and the electronic device may also include external hardware such as a display screen, a microphone, and a speaker. Among them, the one or more computer programs 804 are stored in the above-mentioned memory 803 and are configured to be executed by the one or more processors 802, and the one or more computer programs 804 include instructions, which can be used to execute the above-mentioned Figure 4 to Figure 7 All or part of the steps described in the illustrated embodiments.
[0099] As a possible implementation, when the instruction is executed by the processor 802, the electronic device performs the following steps:
[0100] Receive the user's first question;
[0101] When there is no similar question matching the first question in the knowledge base, prompting the user with a candidate question associated with the first question in the knowledge base, wherein the knowledge base includes a question-answer base including a plurality of question-answer pairs consisting of questions and corresponding answers;
[0102] receiving the user's answer to the candidate question;
[0103] When the candidate question is determined to be a key question according to the answer, a second question is generated, where the second question is related to the first question and the candidate question;
[0104] The question-answer database is searched for similar questions matching the second question, and answers to the similar questions matching the second question are prompted to the user.
[0105] In a possible design, when the electronic device confirms that there is no similar question matching the first question in the knowledge base, specifically performing:
[0106] Confirm that there is no question in the question-and-answer database whose similarity to the first question is greater than a threshold.
[0107] In a possible design, the knowledge base further includes a classification question library, the classification question library includes one or more candidate questions under each question type, and the one or more candidate questions have corresponding weights;
[0108] When the instruction is executed by the electronic device, the electronic device specifically performs the following steps:
[0109] Determining a question type corresponding to the first question;
[0110] The user is prompted with candidate questions associated with the first question in the knowledge base in descending order of weight of one or more candidate questions under the determined question type.
[0111] In a possible design, when the instruction is executed by the electronic device, the electronic device specifically performs the following steps:
[0112] Determining a key semantic value of the candidate question, wherein the key semantic value is related to the sentiment value of the candidate question and the degree of sentiment identification of the answer;
[0113] When the key semantic value is greater than the key semantic threshold value, the candidate question is determined to be a key question.
[0114] In a possible design, when the instruction is executed by the electronic device, the electronic device specifically performs the following steps:
[0115] Combining the first question and the candidate question by textual combination to generate a second question; or,
[0116] At least one first keyword of the first question and at least one second keyword of the second question are extracted, and a second question is generated according to the at least one first keyword and the at least one second keyword.
[0117] In a possible design, when the instruction is executed by the electronic device, the electronic device specifically performs the following steps:
[0118] When there is a similar question matching the first question in the knowledge base, the answer corresponding to the similar question is prompted to the user according to the question-answer pair corresponding to the similar question in the question-answer base.
[0119] The processor 802 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), may be one or more integrated circuits for controlling program execution, may be a baseband chip, etc. The number of memories 803 may be one or more, and the memory 803 may be a read-only memory (ROM), a random access memory (RAM), or a disk storage, etc.
[0120] Figure 8The electronic device shown may be a mobile phone, an iPad, a laptop, a smart TV, a wearable device (such as a smart watch, a smart helmet or a smart bracelet, etc.). Figure 8 When the electronic device shown is a mobile phone, its structure can be seen in Figure 3 As shown, for example, the memory 803 is the internal memory 121 .
[0121] As another form of this embodiment, a chip is provided, which is coupled to a memory and is used to read and execute instructions stored in the memory. When the instructions are executed, the method executed by the electronic device (mobile phone 100) in the above method embodiment can be executed.
[0122] As used in the above embodiments, the term "when..." or "after..." may be interpreted to mean "if..." or "after..." or "in response to determining..." or "in response to detecting...", depending on the context. Similarly, the phrase "when determining..." or "if (the stated condition or event) is detected" may be interpreted to mean "if determining..." or "in response to determining..." or "when (the stated condition or event) is detected" or "in response to detecting (the stated condition or event)", depending on the context. In addition, in the above embodiments, relational terms such as first and second are used to distinguish one entity from another, without limiting any actual relationship and order between the entities.
[0123] In the embodiments provided by the present application, the method provided by the embodiments of the present application is introduced from the perspective of the electronic device as the execution subject. In order to implement the functions in the methods provided by the embodiments of the present application, the electronic device may include a hardware structure and / or a software module, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0124] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media integration. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk), etc.
[0125] For the purpose of explanation, the foregoing description is described by reference to specific embodiments. However, the above exemplary discussion is not intended to be exhaustive, nor is it intended to limit the present application to the disclosed precise form. According to the above teachings, many modifications and variations are possible. The embodiments are selected and described in order to fully illustrate the principles of the present application and its practical application, so that other persons skilled in the art can make full use of the present application and various embodiments with various modifications suitable for the specific purpose contemplated.
[0126] Note: A portion of this patent application document contains material which is subject to copyright protection. The copyright owner reserves all rights reserved except for the production of copies of the material in the patent file or patent record in the Patent Office.
Claims
1. A human-computer interaction method, applied to electronic equipment, characterized in that: include: Receive the user's first question; When there is no similar question matching the first question in the knowledge base, prompting the user with a candidate question associated with the first question in the knowledge base, wherein the knowledge base includes a question-answer base including a plurality of question-answer pairs consisting of questions and corresponding answers; receiving the user's answer to the candidate question; When the candidate question is determined to be a key question according to the answer, a second question is generated, where the second question is related to the first question and the candidate question; Searching the question-answer database for similar questions that match the second question, and prompting the user with answers to the similar questions that match the second question; Wherein, determining the candidate question as a key question according to the answer includes: Determining a key semantic value of the candidate question, wherein the key semantic value is related to the sentiment value of the candidate question and the degree of sentiment identification of the answer; When the key semantic value is greater than the key semantic threshold value, determining the candidate question as a key question; Among them, the key semantic value satisfies the formula: Vk=-(Vs*Va) or Vk=-(Vs*Va)+b, Vk represents the key semantic value, Vs represents the emotional value, Va represents the degree of emotional identification, and b is a preset adjustment value.
2. The method according to claim 1, characterized in that There is no similar question matching the first question in the knowledge base, including: There is no question in the question-answer database whose similarity to the first question is greater than a threshold.
3. The method according to claim 1 or 2, characterized in that The knowledge base also includes a classification question library, which includes one or more candidate questions under each question type, and the one or more candidate questions have corresponding weights; Prompting the user with candidate questions in the knowledge base that are associated with the first question, including: Determining a question type corresponding to the first question; The user is prompted with candidate questions associated with the first question in the knowledge base in descending order of weight of one or more candidate questions under the determined question type.
4. The method according to claim 1 or 2, characterized in that: The generating of the second question comprises: Combining the first question and the candidate question by textual combination to generate a second question; or, At least one first keyword of the first question and at least one second keyword of the candidate question are extracted, and a second question is generated according to the at least one first keyword and the at least one second keyword.
5. The method according to claim 1, characterized in that The method further comprises: When there is a similar question matching the first question in the knowledge base, the answer corresponding to the similar question is prompted to the user according to the question-answer pair corresponding to the similar question in the question-answer base.
6. An electronic device, characterized in that: The electronic device comprises a memory and a processor, and one or more computer programs, wherein the one or more computer programs are stored in the memory, and the one or more computer programs comprise instructions, and when the instructions are executed by the processor, the electronic device performs the following steps: Receive the user's first question; When there is no similar question matching the first question in the knowledge base, prompting the user with a candidate question associated with the first question in the knowledge base, wherein the knowledge base includes a question-answer base including a plurality of question-answer pairs consisting of questions and corresponding answers; receiving the user's answer to the candidate question; When the candidate question is determined to be a key question according to the answer, a second question is generated, where the second question is related to the first question and the candidate question; Searching the question-answer database for similar questions that match the second question, and prompting the user with answers to the similar questions that match the second question; Wherein, determining the candidate question as a key question according to the answer includes: Determining a key semantic value of the candidate question, wherein the key semantic value is related to the sentiment value of the candidate question and the degree of sentiment identification of the answer; When the key semantic value is greater than the key semantic threshold value, determining the candidate question as a key question; Among them, the key semantic value satisfies the formula: Vk=-(Vs*Va) or Vk=-(Vs*Va)+b, Vk represents the key semantic value, Vs represents the emotional value, Va represents the degree of emotional identification, and b is a preset adjustment value.
7. The electronic device according to claim 6, characterized in that: When the electronic device confirms that there is no similar question matching the first question in the knowledge base, specifically performing: Confirm that there is no question in the question-and-answer database whose similarity to the first question is greater than a threshold.
8. The electronic device according to claim 6 or 7, characterized in that: The knowledge base also includes a classification question library, which includes one or more candidate questions under each question type, and the one or more candidate questions have corresponding weights; When the instruction is executed by the electronic device, the electronic device specifically performs the following steps: Determining a question type corresponding to the first question; The user is prompted with candidate questions associated with the first question in the knowledge base in descending order of weight of one or more candidate questions under the determined question type.
9. The electronic device according to claim 6 or 7, characterized in that: When the instruction is executed by the electronic device, the electronic device specifically performs the following steps: Combining the first question and the candidate question by textual combination to generate a second question; or, At least one first keyword of the first question and at least one second keyword of the candidate question are extracted, and a second question is generated according to the at least one first keyword and the at least one second keyword.
10. The electronic device according to claim 6, characterized in that: When the instruction is executed by the electronic device, the electronic device specifically performs the following steps: When there is a similar question matching the first question in the knowledge base, the answer corresponding to the similar question is prompted to the user according to the question-answer pair corresponding to the similar question in the question-answer base.
11. A chip, characterized in that: The chip is coupled to a memory and is used to read and execute computer program instructions stored in the memory to perform the method according to any one of claims 1 to 5.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium comprises a computer program, and when the computer program is executed on an electronic device, the electronic device is caused to execute the method according to any one of claims 1 to 5.
13. A program product, characterized in that The method comprises instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Artificial intelligence-based question-answer guiding method and device and computer equipment
CN108170792A
Question associated pushing method, electronic device and computer readable storage medium
CN108509476A